Default of modalPresentationStyle changed in ios13?

Default of modalPresentationStyle is changed in ios13. Is this correct?


NSLog(@"%ld", (long)presentVC.modalPresentationStyle);


When i print log at ios12, it show 0, but when i print style at ios13, is change to 1


So when you presentModalView Controller in ios 13, you need add:


presentVC.modalPresentationStyle = UIModalPresentationFullScreen;


I dont see this change at newest document of Apple. So i want to confirm this change only..

Replies

That means it would have changed from fullScreen to pageSheet.

UIModalPresentationStyle.pageSheet

In a horizontally regular environment, the presented view'€™s width is set to the width of the screen in a portrait orientation and the height is set to the height of the screen. Any uncovered areas are dimmed to prevent the user from interacting with them. (In portrait orientations, this option is essentially the same as

UIModalPresentationStyle.fullScreen
.)

In a horizontally compact environment, this option behaves the same as

UIModalPresentationStyle.fullScreen
.


That avoid the following behavior:

UIModalPresentationStyle.fullScreen

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


So, does not seem to change the display, but what happens when presentation completes.


I suspect there may be a lot of such small changes in IOS13.

>>Default of modalPresentationStyle is changed in ios13. Is this correct?


Yes.


>>So when you presentModalView Controller in ios 13, you need add: […] = UIModalPresentationFullScreen;


Probably not. You should use the new default style unless you have a very strong reason for forcing it to full screen presentation.


The way information is presented has changed a bit in iOS 13, and that's why the default has changed. The best choice is to stay consistent with the new style by continuing to use the default value.