将ipad应用程序转换为iphone。通用应用 [英] Convert ipad application to iphone. Universal app

查看:138
本文介绍了将ipad应用程序转换为iphone。通用应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将iPad应用程序转换为iPhone-通用应用程序。

Convert iPad application to iPhone- Universal app.

我已经拥有一个iPad应用程序,现在我想制作该iPad应用程序的通用应用程序。

I already have one iPad application, now I want to make a universal app of that iPad application.

如何转换?可能吗?或者我是否必须开始新的应用程序?

How to convert? Is it possible? Or do I have to start a new app?

推荐答案

在Interface Builder中打开您的项目。单击目标旁边的显示三角形,然后右键单击目标并选择升级iPad的当前目标...。

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...".

然后阅读< a href =http://developer.apple.com/library/ios/#documentation/General/Conceptual/iPadProgrammingGuide/Introduction/Introduction.html =nofollow noreferrer>iPad编程指南,尤其是部分开始你的项目

Then read the iPad Programming Guide, especially the section Starting Your Project.

编辑:

我现在看到 - iPad到iPad / iPhone。

I see now -- iPad to iPad/iPhone.

我想你会做类似以下的事情:

I think you would do something like the following:



  1. 主窗口/应用代表/等创建一个iPhone的.xib到
    corresspond现有.xib为
    iPad。

  2. 在您的信息plist中添加一个条目:
    NSMainNibFile ,w使用新iPhone xib的
    名称的价值

  3. 转到您的构建设置并将基本SDK的
    设置为4.1(如果你是$ b $则设置为4.0) b仍然安装了较旧的SDK)

  4. 如果只有
    担心iPhone和iPod
    ,请将你的iOS部署目标
    构建设置保持在3.2触摸4.x。

  5. 将目标设备系列版本设置为
    设置为iPhone / iPad

  6. 开始将代码重构为
    创建两个不同的代码路径,一个是
    用于iPhone,另一个用于iPad,其中
    合适。

  1. Create a .xib for the iPhone for the Main Window/App Delegate/etc, to corresspond your existing .xib for iPad.
  2. Add an entry in your info plist: NSMainNibFile, with the value of the name of your new iPhone xib
  3. Go to your build settings and set the Base SDK to 4.1 (or 4.0 if you still have the older SDK installed)
  4. Keep your iOS Deployment Target build setting at 3.2 if you're only worried about iPhones and iPod Touches with 4.x.
  5. Set the Targeted Device Family build setting to iPhone/iPad
  6. Start refactoring your code to create two different code paths, one for iPhone and one for iPad, where appropriate.

这篇关于将ipad应用程序转换为iphone。通用应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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