Copied iPhone storyboard over to iPad, but iPad loading with different
view controller
I recently copied everything in my iPhone storyboard over to an iPad
storyboard and changed nothing. It runs perfectly on the iPhone, loading
WelcomeViewController as the initial scene.
However, when I run it on the iPad, the program crashes because it tries
to load MainViewController as the initial scene.
I checked on Interface Builder, and the initial scene is set to view
controller WelcomeViewController. I went in the debugger and put a
breakpoint in the ViewDidLoad method of WelcomeViewController, and the
iPad never hits that breakpoint but the iPhone does.
This is the Identity Inspector for the view controller of my initial scene.
This is the Attributes Inspector for the view controller of my initial
scene (same as above).
Why does the iPad insist on trying to load ViewController as the initial
view controller?
Thanks
EDIT: When I go to Targets > iPad Deployment Info, and set the main
storyboard to the MainStoryboard_iPhone instead of MainStoryboard_iPad
everything works. For some reason this MainStoryboard_iPad, a literal
clone of the iPhone storyboard, doesn't.
No comments:
Post a Comment