iOS8 Interface Rotation Methods not called

The viewWillTransitionToSize:withTransitionCoordinator: seems to only work if the interface is actually going to change size, meaning we have rotated 90 degrees. If you have a mask on your layout that only allows landscape, when rotation 180 degrees, the interface size doesn’t change, so this method doesn’t seem to be called. I have worked around this … Read more

How to implement UIPageViewController that utilizes multiple ViewControllers

First of all, you are absolutely right that the view controllers that constitute the “pages” of the UIPageViewController can be completely different in nature. Nothing whatever says that they have to be instances of the same view controller class. Now let’s get to the actual problem, which is that you very sensibly need a way … Read more

Easiest way to support multiple orientations? How do I load a custom NIB when the application is in Landscape?

I found a much better way that works independent of the nav controller. Right now, I have this working when embedded in a nav controller, and when NOT embedded (although I’m not using the nav controller right now, so there may be some bug I’ve not seen – e.g. the PUSH transition animation might go … Read more

presentingViewController is nil when using presentViewController:animated:completion: in iOS 8

Had a similar issue with iOS 8, where presentingController is nil when checking the value in viewDidLoad. When viewDidLoad is called, there is no guarantee that the view controller hierarchy is loaded in the navigation tree. Moving the logic to a later stage (for example: viewWillAppear) should resolve that issue as presentingController should be loaded … Read more

Order of UIViewController initialization and loading

The view loading system on the iPhone works like this: When you initialize a view controller (either with -init or -initWithNibName:bundle:), it doesn’t actually create and initialize the view. When you call -view for the first time, it calls -loadView. By default, -loadView just loads the view from the xib file (nibName). If you override … Read more

Swapping rootViewController with animation

transitionWithView is intended to animate subviews of the specified container view. It is not so simple to animate changing the root view controller. I’ve spent a long time trying to do it w/o side effects. See: Animate change of view controllers without using navigation controller stack, subviews or modal controllers? EDIT: added excerpt from referenced … Read more