In Xcode when creating a subclass of UIViewController, an checkbox named "Targeted for iPad" exists among others.
What if I want to create an app that runs on iPhone and iPad (I think it is called universal application)? should I check it?
If I checked it, what is happening under the hood?
76
votes
1 Answers
150
votes
I tried both with and without and diffed the generated files.
The only difference it makes is whether the pre-built shouldAutorotate:
method returns YES to all orientations (normal for iPad apps) or just for portrait (normal for iPhone apps). It also changes the dimensions of the UIView in the generated XIB file (if you tick the option to create one) from iPhone to iPad screen size.
So just choose whichever one sounds like the best starting point for the class you're about to create. Both things are trivial to edit later.