The code below shows how this works with the previous code example. To present the DetailViewController full screen, the modalPresentationStyle property of a view controller must be set to. To prevent this, the presentation style can be changed. Using iOS 13, the DetailViewController will be presented with the new presentation style, which is named ‘Automatic’. In iOS 12, the DetailViewController will be presented full screen. The above code will init a DetailViewController and present the DetailViewController. When developing Swift code for iOS 12 or below, your code may look something like this: let detailVC = DetailViewController() Left is the new automatic style, right is the fullScreen style which is also usual on iOS 12 or lower. Differences presentation styles with iOS 13. This can be changed to the iOS 12 presentation style, which is named fullScreen. Presentation stylesīy default, all detail pages that are presented will use the new presentation style for iOS 13, which is. When the user uses the ‘ pull-to-dismiss‘ gesture, all view controllers in the detail flow will be closed and deinit. The view controller that opened the detail view controller, is always visible behind the screen. Closing a detail page with iOS 13 is possible with a simple ‘ pull-to-dismiss‘ gesture.Īnother improvement that the new presentation style provides, is that the user better understands where in the app he is. The new presentation style can be helpful for your users, allowing them to always close the detail flow without pressing multiple times on the back button. The new presentation style will be enabled by default in iOS 13 and provides some new interactions. One of them is the new way to present a detail view controller. Apple changed multiple UI styles in iOS 13.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |