Targeted for iPad option in Xcode
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?
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.
链接地址: http://www.djcxy.com/p/44968.html下一篇: 针对Xcode中的iPad选项