简体   繁体   English

使用Xcode从iPhone Project到iPad Project

[英]From iPhone Project to iPad Project using Xcode

I want to be able to change my iPhone project into an iPad project. 我希望能够将我的iPhone项目更改为iPad项目。 This is how I did it: I changed the Active Executable stuff to iPad and went in to the info and changed the Targeted Device family to iPad. 这就是我的方法:我将Active Executable内容更改为iPad,然后进入信息,然后将Targeted Device系列更改为iPad。 Then I went into Interface Builder and went File > Create iPad Version Using Autosizing Masks. 然后我进入Interface Builder,然后进入File> Use Autosizing Masks创建iPad版本。 Then I named the new xib that was created exactly the same as the xib it was based of (The iPhone xib). 然后,我命名了新的xib,该新的xib与它所基于的xib(iPhone xib)完全相同。 Then I replaced the iPhone xib with the iPad xib. 然后,我用iPad xib替换了iPhone xib。 This works fine and launches as an iPad app when I've created a completely new project (Yes I did add some stuff in interface builder to make sure it wasn't that which was make it not working.) But when I do this with the project I want to do it with the app launches in the iPad but as an iPhone app. 当我创建了一个全新的项目时,它可以很好地工作并作为iPad应用程序启动(是的,我确实在界面生成器中添加了一些东西,以确保不是那个使它无法正常工作的东西。)但是当我使用我要使用该应用程序执行的项目在iPad上启动,但作为iPhone应用程序启动。

The project I want to change from iPhone to iPad is here: http://icodeblog.com/wp-content/uplo...iCodeOauth.zip 我要从iPhone更改为iPad的项目在这里: http : //icodeblog.com/wp-content/uplo...iCodeOauth.zip

Hope this makes sense guys! 希望这有道理的家伙!

Thank you in advance! 先感谢您!

take a look at this tutorial from Ray Wenderlich's blog: http://www.raywenderlich.com/1111/how-to-port-an-iphone-application-to-the-ipad 从Ray Wenderlich的博客中查看本教程: http ://www.raywenderlich.com/1111/how-to-port-an-iphone-application-to-the-ipad

Perfectly explained. 完美的解释。

Did you also change/add the iPad window in the info.plist? 您是否还在info.plist中更改/添加了iPad窗口? You might also need to delete the app from the sim or device, and clean before you build. 您可能还需要从SIM卡或设备中删除该应用程序,然后进行清理,然后再进行构建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM