In iOS8, UISplitViewController changed, and now notifies its delegate of a pending displayMode change via splitViewController:willChangeToDisplayMode:
. I need to update some aspects of my secondary view controller in response to this change.
It's simple enough to call methods on the secondary VC during this delegate method, but the VC doesn't yet know what its new bounds will be.
Is there a reasonable way to be notified that the bounds of the VC will change, apart from KVO on the bounds of the secondary VC? Ideally, the VC would have viewWillTransitionToSize:withTransitionCoordinator:
called for the displayMode change, since that provides for the ability to animate alongside the transition.
So, for now I'm just using KVO. I followed some of the advice here.
In
viewDidLoad
:Then:
I tried this on the bounds of the view, but that fired a lot more frequently than the KVO on the frame.