针对 Xcode 的 iPad 选项

在 Xcode,当创建 uiViewController 的一个子类时,会出现一个名为“ Targeted for iPad”的复选框。
如果我想创建一个可以在 iPhone 和 iPad 上运行的应用程序(我认为它被称为通用应用程序) ,该怎么办?要我检查一下吗?
如果我检查一下,引擎盖下发生了什么?

7294 次浏览

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.