Xcode 4 .xib创建iPad版 [英] Xcode 4 .xib Create iPad Version

查看:191
本文介绍了Xcode 4 .xib创建iPad版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个iPhone xib我想变成一个iPad xib。在Xcode 3中有一个创建iPad版本菜单选项。我如何在Xcode 4中执行此操作?

I have an iPhone xib I want to turn into an iPad xib. In Xcode 3 there was a "Create iPad Version" menu option. How do I do this in Xcode 4?

我目前调整了我的xib大小,但是当我打开模拟项目(导航栏等)时,它会将视图缩小回iPhone大小。

I currently resized my xib, but when I turn on the simulated items (Navigation Bar, etc.) it shrinks the view back down to iPhone size.

推荐答案

这对我有用:


  1. 制作一个在Finder中复制.xib。

  2. 在文本编辑器中打开复制的文件。

  3. 更改com.apple.InterfaceBuilder3.CocoaTouch。 XIBtocom.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB。

  4. 将IBCocoaTouchFramework的所有实例更改为IBIPadFramework。

  5. 搜索{480,320}等尺寸并进行编辑。或者只是在Xcode中重新打开文件并使用GUI根据需要调整项目大小。

  1. Make a copy of the .xib in the Finder.
  2. Open the copied file in a text editor.
  3. Change "com.apple.InterfaceBuilder3.CocoaTouch.XIB" to "com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB".
  4. Change all instances of "IBCocoaTouchFramework" to "IBIPadFramework".
  5. Search for sizes like {480, 320} and edit them. Or just reopen the file in Xcode and use the GUI to resize items as needed.

如果需要,这也可以反向运行将iPad xib更改为iPhone xib。

This also works in reverse, if you need to change an iPad xib into an iPhone xib.

这篇关于Xcode 4 .xib创建iPad版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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