将iPhone / iPad应用程序降级为仅限iPhone的XIB [英] Downgrade iPhone/iPad app to iPhone-only XIB

查看:126
本文介绍了将iPhone / iPad应用程序降级为仅限iPhone的XIB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近将我的iPhone应用程序转换为iPad,右键单击目标并选择升级iPad的当前目标。然后,每次我使用iPad模拟器打开应用程序时,它都会打开新创建的MainWindow-iPad.xib。

I recently converted my iPhone app to be for iPad as well by right-clicking on the target and selecting "Upgrade Current Target for iPad". Then, every time I opened the app with the iPad simulator, it opens the newly created MainWindow-iPad.xib.

然而,我遇到了问题,所以我'我想做的是降级iPhone应用程序,以便它只在iPhone / iPad上运行iPhone xib。 (因此,当它在iPhone上运行时,它会正常运行,而在iPad上,它会在较小视图中打开,仅供iPhone使用)。这是可能的,还是我必须更改构建目标或其他内容?

However, I ran into problems, so what I'd like to do is "downgrade" the iPhone app so it only runs the iPhone xib on the iPhone/iPad. (So when it runs on the iPhone, it runs normally, and on the iPad it opens in the "smaller" view for iPhone-only apps). Is this possible, or do I have to change the build targets or something along those lines?

提前感谢您提供任何帮助。

Thanks for any help in advance.

推荐答案

撤消Xcode所做的更改相当容易。查看应用程序的Info.plist文件,您应该看到一个名为NSMainNibFile~ipad的条目。这是导致加载iPad特定NIB文件的原因。如果删除该条目,则应该返回使用两个设备的iPhone NIB文件。

It is fairly easy to undo the changes made by Xcode. Look at the Info.plist file for your app and you should see an entry named NSMainNibFile~ipad. This is what causes the iPad specific NIB file to be loaded. If you delete that entry you should be back to using the iPhone NIB file for both devices.

您可能还想将目标设备系列从iPhone / iPad更改回只是iPhone。

You may also want to change the Targeted Device Family from iPhone/iPad back to be just iPhone.

这篇关于将iPhone / iPad应用程序降级为仅限iPhone的XIB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆