Since willAnimateRotationToInterfaceOrientation:duration:
is deprecated in iOS8, one needs to use viewWillTransitionToSize:withTransitionCoordinator:
i
I know this question is a bit old at this point but I think the issue might be solved a different way for some who may come across it. If you are trying to load a view that is part of a DIFFERENT controller by using addSubview(controller.view)
, you need to also add that controller to the parent as well (possibly the view you are adding to's controller). If you do not add the controller to a parent you will never receive the updates for size changes. We later found out the reason for Apple's API change; with the iPad pro, your SizeClass can change without rotation with the multi-tasking ability. This will also call the method:
viewWillTransitionToSize(size: CGSize,
withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator)
In the parent class, if you override the above method, make sure you call super as well or you will just find another way to beat your head against a wall...