UIDocumentBrowserTransitionController does not make presented view controller control status bar

Originator:douglashill
Number:rdar://35966854 Date Originated:11-Dec-2017 11:04 pm
Status:Open Resolved:
Product:iOS + SDK Product Version:iOS 11.1.1
Classification:Other Bug Reproducible:Always
 
Summary:
When presenting a view controller from a UIDocumentBrowserViewController, getting the transition controller with transitionControllerForDocumentURL:, the presented view controller does not control the status bar.

This is because UIDocumentBrowserTransitionController creates a plain UIPresentationController. This should not be done for opaque presented view controllers because a plain UIPresentationController fills the screen but returns NO to _shouldPresentedViewControllerControlStatusBarAppearance.

Steps to Reproduce:
1. Use UIDocumentBrowserViewController
2. Open a document by presenting a view controller with the transition controller from transitionControllerForDocumentURL:
3. Make the presented view controller (or some child of it) hide the status bar or alter the status bar appearance.

Expected Results:
Presented view controller (or some child of it) should be able to hide and change the appearance of the status bar.

This can be done by making the presentation controller used by UIDocumentBrowserTransitionController should return YES to _shouldPresentedViewControllerControlStatusBarAppearance.

Actual Results:
Presented view controller (or some child of it) can not change the status bar from what the UIDocumentBrowserViewController specifies.

Version:
iOS 11.1.1

Notes:
Workaround is to set modalPresentationCapturesStatusBarAppearance on the presented view controller, even though this is a full screen presentation and this violates separation of concerns as this ought to be the presentation controller’s responsibility.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!