viewWillTransitionToSize:withTransitionCoordinator: not called when changing preferredPrimaryColumnWidthFraction

Originator:mark
Number:rdar://19819610 Date Originated:12-Feb-2015 04:32 PM
Status:Open Resolved:
Product:iOS Product Version:iOS 8.1.3 (12B466) - iOS 8.2 beta 5 (12D5480a)
Classification:Other Bug Reproducible:Always
 
Summary:
Typically, when a container view controller resizes one of its child view controllers, it will call viewWillTransitionToSize:withTransitionCoordinator: to let it know that it will be resized. This allows the child view controller to respond appropriately to the change in size, including animating any necessary changes.

A UISplitViewController is a container view controller. When you change its preferredPrimaryColumnWidthFraction property, it can resize its child view controllers. However, even when it does resize its children, it does not call viewWillTransitionToSize:withTransitionCoordinator:. This makes adjusting to the new size much more difficult. E.G. in my case, I have a UIScrollView whose x contentOffset I need to adjust according to the size of the master view controller's view.

Steps to Reproduce:
Look at the sample project attached.

Alternatively:
1. Create a UISplitViewController
2. Implement viewWillTransitionToSize:withTransitionCoordinator: in your master view controller
3. Create a way to change the preferredPrimaryColumnWidthFraction property on the split view controller
4. Observe that viewWillTransitionToSize:withTransitionCoordinator: doesn't get called on your master view controller (nor on your detail view controller for that matter)

Expected Results:
viewWillTransitionToSize:withTransitionCoordinator: should be called with the new size.

Actual Results:
viewWillTransitionToSize:withTransitionCoordinator: is never called

Version:
iOS 8.1.3 (12B466) - iOS 8.2 beta 5 (12D5480a)

Notes:


Configuration:
Any device that supports an expanded UISplitViewController

Attachments:
'TestSplitResizing.zip' was successfully uploaded.

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!