Present a view controller just before the UIDocumentBrowserViewController to be shown at launch

571 views Asked by At

Here are the facts: I have a document based app using iOS 11's UIDocumentBrowserViewController. And as noted in the documentation, I set it as my root view controller:

Always assign the document browser as your app's root view controller. Don't place the document browser in a navigation controller, tab bar, or split view, and don't present the document browser modally.

I have an animated launch screen in another view controller and in an usual app, it is the root controller. But here it can't be...

So my problem is that I can't achieve the smooth transition between the launch screen and the animated splash view controller.

I've tried to perform the segue unanimated to the splash in the viewWillAppear and in the viewDidLoad of the browser view controller... But between the launch screen and the splash screen, I have a glimpse of 1 second or two on the browser...

I even tried to present it over the browser view controller inside the applicationDidFinishLaunching but I have the same result...

So if anyone has a clean way of doing it, I'm interested. I would not like ending by inserting savagely views over the browser, if you see what I mean.

Thanks in advance.

1

There are 1 answers

2
Thomas Deniau On

Please watch the Managing Documents in your iOS apps WWDC session tomorrow. This restriction is about to get lifted. You can present the document browser modally full-screen over your splash screen, as long as you do not dismiss it afterwards (it needs to be at the "root" of your app for usability reasons). Don't forget to release any memory used by your splash screen once you present the browser.

However, I think a cleaner design would be to present your splash screen over the browser in viewWillAppear, as you suggest. If that doesn't work, could you please file a bug at bugreport.apple.com? Thanks.