Convert iPad application to iPhone- Universal app.
将iPad应用程序转换为iPhone- Universal应用程序。
I already have one iPad application, now I want to make a universal app of that iPad application.
我已经有一个iPad应用程序了,现在我想要做一个iPad应用程序的通用应用程序。
How to convert? Is it possible? Or do I have to start a new app?
如何转换?是可能的吗?或者我需要启动一个新的应用程序吗?
1 个解决方案
#1
4
Open up your project in Interface Builder. Click on the disclosure triangle next to "Targets", then right-click on the target and choose "Upgrade Current Target for iPad...".
在Interface Builder中打开项目。点击“目标”旁边的信息,然后右键点击目标,选择“升级iPad的当前目标…”
Then read the iPad Programming Guide, especially the section Starting Your Project.
然后阅读iPad编程指南,特别是开始项目的部分。
Edit:
编辑:
I see now -- iPad to iPad/iPhone.
我现在看到的是iPad/iPhone。
I think you would do something like the following:
我认为你应该做如下的事情:
- Create a .xib for the iPhone for the Main Window/App Delegate/etc, to corresspond your existing .xib for iPad.
- 为iPhone的主窗口/应用委托等创建一个.xib,以corresspond为iPad创建一个.xib。
- Add an entry in your info plist:
NSMainNibFile
, with the value of the name of your new iPhone xib - 在您的info plist中添加一个条目:NSMainNibFile,其值为您的新iPhone xib
- Go to your build settings and set the Base SDK to 4.1 (or 4.0 if you still have the older SDK installed)
- 转到构建设置,将基本SDK设置为4.1(如果仍然安装了旧的SDK,则将其设置为4.0)
- Keep your iOS Deployment Target build setting at 3.2 if you're only worried about iPhones and iPod Touches with 4.x.
- 如果你只担心iphone和iPod touch 4.x,那就把你的iOS部署目标设置为3.2。
- Set the Targeted Device Family build setting to iPhone/iPad
- 将目标设备系列设置设置为iPhone/iPad
- Start refactoring your code to create two different code paths, one for iPhone and one for iPad, where appropriate.
- 开始重构代码,创建两个不同的代码路径,一个用于iPhone,另一个用于iPad(如果合适的话)。
#1
4
Open up your project in Interface Builder. Click on the disclosure triangle next to "Targets", then right-click on the target and choose "Upgrade Current Target for iPad...".
在Interface Builder中打开项目。点击“目标”旁边的信息,然后右键点击目标,选择“升级iPad的当前目标…”
Then read the iPad Programming Guide, especially the section Starting Your Project.
然后阅读iPad编程指南,特别是开始项目的部分。
Edit:
编辑:
I see now -- iPad to iPad/iPhone.
我现在看到的是iPad/iPhone。
I think you would do something like the following:
我认为你应该做如下的事情:
- Create a .xib for the iPhone for the Main Window/App Delegate/etc, to corresspond your existing .xib for iPad.
- 为iPhone的主窗口/应用委托等创建一个.xib,以corresspond为iPad创建一个.xib。
- Add an entry in your info plist:
NSMainNibFile
, with the value of the name of your new iPhone xib - 在您的info plist中添加一个条目:NSMainNibFile,其值为您的新iPhone xib
- Go to your build settings and set the Base SDK to 4.1 (or 4.0 if you still have the older SDK installed)
- 转到构建设置,将基本SDK设置为4.1(如果仍然安装了旧的SDK,则将其设置为4.0)
- Keep your iOS Deployment Target build setting at 3.2 if you're only worried about iPhones and iPod Touches with 4.x.
- 如果你只担心iphone和iPod touch 4.x,那就把你的iOS部署目标设置为3.2。
- Set the Targeted Device Family build setting to iPhone/iPad
- 将目标设备系列设置设置为iPhone/iPad
- Start refactoring your code to create two different code paths, one for iPhone and one for iPad, where appropriate.
- 开始重构代码,创建两个不同的代码路径,一个用于iPhone,另一个用于iPad(如果合适的话)。