如何在 xcode 4.2 中将 iPhone 应用程序升级到 iPad 应用程序?
我通过右键单击项目目标并选择重复选项将我的 iPhone 应用程序升级为通用。然后有两个选择——仅复制和“复制并过渡到iPad”。我选择第二个。然后,一组名为 Resources_iPad 的 iPad XIB 文件(与 iPhone XIB 名称相同)会自动添加到应用程序中。但当我选择 iPad 模拟器来运行该项目时,该应用程序仅选择 iphone XIB。谁能帮我解决这个问题?
I have upgraded my iPhone app to universal by right right clicking the project target and selecting duplicate option. Then there was 2 choices-duplicate only and 'duplicate and transition to iPad'. I choose second one. Then a group of iPad XIB files(having same name as iPhone XIBs) called Resources_iPad is automatically added to the app. But still when I choose iPad simulator to run the project, the app chooses only iphone XIBs. Can anyone help me to resolve this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
转到目标(或项目)设置并检查
目标设备系列
是否设置为iPhone/iPad
go to target (or project) settings and check if
Targeted Device Family
set toiPhone/iPad
代码中加载的任何 XIB 仍将加载 iPhone 版本。您应该使用 UIUserInterfaceIdiom() 来确定要加载哪个 XIB。如果您在 Info.plist 中指定了您的 iPhone,还要确保您已在 Info.plist 中正确设置了 iPad 接口文件。
Any XIBs loaded in code will still load the iPhone version. You should use
UIUserInterfaceIdiom()
to determine which XIB to load. Also make sure you have correctly set your iPad interface file in Info.plist if you specify your iPhone one there.