FormSheet modals don't get updated frame until viewDidAppear:

Originator:hoar.ian
Number:rdar://26311655 Date Originated:May 16 2016
Status:Open Resolved:no
Product: Product Version:
Classification: Reproducible:
 
Summary:
When presenting a viewController with the .FormSheet style, the frame is not properly updated until viewDidAppear in the view lifecycle.  This is problematic because if operations that depend on the view size happen before the view's frame is updated, they may render incorrectly, or fail altogether (ie. scrollToItem:atScrollPosition:animated: fails when called in viewWillAppear:, but is visible to the user in the viewDidAppear:)

Steps to Reproduce:
1- on iPad, present a view controller modally with the presentation style set to .FormSheet
2- print the frame after calling super.viewWillAppear() in viewWillAppear and likewise in viewDidAppear.  
3- observe that the frame is the full size of the screen in viewWillAppear, and the correct modal size in viewDidAppear. 

Expected Results:
Frame should be the correct smaller size in viewWillAppear:

Actual Results:
Frame is the incorrect full size in viewWillAppear:

Version:
9.3

Notes:


Configuration:
any device that can present with a .FormSheet modalPresentationStyle 

Attachments:

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!