{"id":136,"date":"2021-04-07T13:46:08","date_gmt":"2021-04-07T18:46:08","guid":{"rendered":"https:\/\/www.flom.com\/?p=136"},"modified":"2025-11-04T14:56:24","modified_gmt":"2025-11-04T20:56:24","slug":"opening-view-in-ios-13","status":"publish","type":"post","link":"https:\/\/www.flom.com\/?p=136","title":{"rendered":"Opening View in iOS 13"},"content":{"rendered":"\r\n<p>I had a legacy iPad project that began having issues with views opening in a &#8216;modal&#8217; window instead of full screen. Technically, they were being instantiated as modals, but since IOS 13 the modal view is what will be presented when using <code>instantiateViewControllerWithIdentifier<\/code>. It&#8217;s a simple fix:<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"swift\">if (@available(iOS 13, *)) { \r\n   nextPage.modalPresentationStyle = UIModalPresentationCustom; \r\n}<\/pre>\r\n<p>Unfortunately when you dismiss the view you instantiate using this, it&#8217;s parent view no longer receives a <code>viewDidAppear<\/code> event. So I had to add a call to <code>viewDidAppear<\/code> before running <code>dismissViewControllerAnimated<\/code> like so:<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"swift\">if (@available(iOS 13, *)) { \r\n    [self.presentingViewController viewDidAppear:false]; \r\n}<\/pre>\r\n","protected":false},"excerpt":{"rendered":"<p>I had a legacy iPad project that began having issues with views opening in a &#8216;modal&#8217; window instead of full [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":491,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[9,7,10,17],"tags":[],"class_list":["post-136","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ios","category-ipad","category-objective-c","category-swift"],"uagb_featured_image_src":{"full":["https:\/\/www.flom.com\/wp-content\/uploads\/2021\/04\/image-43c8327f-bdc6-451e-ba13-ebfbd6bc40ab.png",1024,1024,false],"thumbnail":["https:\/\/www.flom.com\/wp-content\/uploads\/2021\/04\/image-43c8327f-bdc6-451e-ba13-ebfbd6bc40ab-150x150.png",150,150,true],"medium":["https:\/\/www.flom.com\/wp-content\/uploads\/2021\/04\/image-43c8327f-bdc6-451e-ba13-ebfbd6bc40ab-300x300.png",300,300,true],"medium_large":["https:\/\/www.flom.com\/wp-content\/uploads\/2021\/04\/image-43c8327f-bdc6-451e-ba13-ebfbd6bc40ab-768x768.png",768,768,true],"large":["https:\/\/www.flom.com\/wp-content\/uploads\/2021\/04\/image-43c8327f-bdc6-451e-ba13-ebfbd6bc40ab.png",1024,1024,false],"1536x1536":["https:\/\/www.flom.com\/wp-content\/uploads\/2021\/04\/image-43c8327f-bdc6-451e-ba13-ebfbd6bc40ab.png",1024,1024,false],"2048x2048":["https:\/\/www.flom.com\/wp-content\/uploads\/2021\/04\/image-43c8327f-bdc6-451e-ba13-ebfbd6bc40ab.png",1024,1024,false]},"uagb_author_info":{"display_name":"Todd Flom","author_link":"https:\/\/www.flom.com\/?author=1"},"uagb_comment_info":0,"uagb_excerpt":"I had a legacy iPad project that began having issues with views opening in a &#8216;modal&#8217; window instead of full [&hellip;]","_links":{"self":[{"href":"https:\/\/www.flom.com\/index.php?rest_route=\/wp\/v2\/posts\/136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flom.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flom.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flom.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flom.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=136"}],"version-history":[{"count":19,"href":"https:\/\/www.flom.com\/index.php?rest_route=\/wp\/v2\/posts\/136\/revisions"}],"predecessor-version":[{"id":177,"href":"https:\/\/www.flom.com\/index.php?rest_route=\/wp\/v2\/posts\/136\/revisions\/177"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.flom.com\/index.php?rest_route=\/wp\/v2\/media\/491"}],"wp:attachment":[{"href":"https:\/\/www.flom.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flom.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flom.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}