Good day to you,
I have an iPhone app which I want to run on an iPad. However I'm experiencing different behaviour when running on an iPad (sim or device) as opposed to running it on the iPhone. NOTE: I do not want to make it a universal app, it is set as an iPhone app.
The initial view controller is a tabBarController - see below (taken from the iPhone storyboard - there is no iPad storyboard):
I have some code in appDidFinishLaunchingWithOptions that gives me a handle on the tabBarController which I use later on. When running on the iPhone, the line of code I use (shown at line 53 below) works fine and returns me the tabBarController object, the intial view controller.
My problem: When running on the iPad (simulator or device), self.window.rootViewController in the app delegate returns me the "Alert Central View Controller" object - which you can see from the storyboard snippet above, is further down the view hierarchy, and is definitely not the initial view controller.
What is happening here? I would have thought that because it's running in iPhone mode, and not iPad mode, there should be no change to the hierarchy of views when running on the iPad. Obviously I'm wrong!
Should I be trying to get at the initial view controller in a different way?
Can someone teach me what the difference is, please?
Thanks!