开发者

Targeted for iPad option in Xcode

In Xcode when creating a subclass of UIViewController, an checkbox named "Targeted for iPad开发者_C百科" 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜