将xcode 4.6 iPhone应用程序转换为通用应用程序 [英] Convert xcode 4.6 iPhone app in to Universal app

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

问题描述

我正在尝试将我现有的iPhone应用程序项目升级为通用应用程序,
我已实施以下步骤,

I am trying to upgrade my existing iPhone app project to an Universal app, I have implemented following steps,

步骤1:项目导航器 - 目标 - 摘要 - 设备 - 通用(从iPhone到通用)

Step 1: Project Navigator - target - Summary - devices - Universal (From iPhone to Universal)

步骤2:创建带有NavigationBar Flow的TabBar故事板,

Step 2: Created TabBar with NavigationBar Flow in Storyboard,

当我在iPhone中运行我的项目时,它可以正常工作,但是当我在iPad上运行时,它只显示带有NavigationBar的TabBar。

When i run my project in iPhone it works properly but when i run in iPad it shows only TabBar with NavigationBar.

现在我的问题是如何为iPad创建新的 .xib 文件?当我从iPhone到Universal选择我的设备时,Xocde不会自动创建。

Now my problem is how to create new .xib files for iPad ? Xocde doesn't created automatically when i selected my device from iPhone to Universal.

如何使用iPad映射我的iPhone .xib 文件。

How to map my iPhone .xib files with iPad.

我是否需要创建新的插座和我的iPhone中的所有按钮的操作 .xib

Do i need to create new Outlet and action for all buttons which are there in my iPhone .xib?

提前致谢。

推荐答案


为所有视图控制器创建一个新的xib,将视图控制器命名为~ipad作为后缀(例如,FirstViewController~ipad.xib)

Create a new xib for all your view controllers ,name the view controllers with "~ipad " as a suffix(ex. FirstViewController~ipad.xib)

当应用程序在ipad中运行时,xcode将自动使用xib。通过xib中的身份检查器将新创建的xib与适当的类链接。

xcode will automatically use the xib when the application run in ipad. Link your newly created xib with appropriate classes through identity inspector in xib.

注意:创建新的xib后,添加现有视图控制器中添加的所有控件,并将新添加的控件与文件所有者链接。

Note : After creating a new xib, add all the controls as added in existing view controller and link newly added controls with file owner.

添加所有控件并与文件所有者链接。

add all the controls and link with file owner.

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

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