2020年1月28日火曜日

Swift on iOS13, UIView present

The change on iOS13,  UIView.present default style is card presentation

card presentation


to make it full screen is easy.

solution
to set .fullscreen or .overFullScreen to

modalPresentationStyle

for example

        let viewCon = SampleViewController2(nibName: "SampleViewController", bundle: .main)
        viewCon.modalPresentationStyle = .fullScreen
        self.present(viewCon, animated: true, completion: nil)



.fullScreen

Discussion

The views belonging to the presenting view controller are removed after the presentation completes.

.overFullScreen

Discussion

The views beneath the presented content are not removed from the view hierarchy when the presentation finishes. So if the presented view controller does not fill the screen with opaque content, the underlying content shows through.


0 件のコメント:

コメントを投稿