Downgrade iPhone/iPad app to iPhone

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.

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.


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.

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

链接地址: http://www.djcxy.com/p/17146.html

上一篇: xcode iphone项目和ipad项目纳入通用应用程序

下一篇: 将iPhone / iPad应用降级至iPhone