首页 > 其他 > 详细

xib中的view对iPhone和iPad自适应

时间:2014-07-17 23:25:38      阅读:657      评论:0      收藏:0      [点我收藏+]

1

This worked for me:

    Make a copy of the .xib in the Finder.
    Open the copied file in a text editor.
    Change "com.apple.InterfaceBuilder3.CocoaTouch.XIB" to "com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB".
    Change all instances of "IBCocoaTouchFramework" to "IBIPadFramework".
    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.

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

2

Select the target (in XCODE4 it‘s shown when you select the project). Once selected use the contextual menu to "Duplicate" it. It will ask you want to "Duplicate and transition to iPad". Then all the XIBS will be duplicated with the new iPad size.

xib中的view对iPhone和iPad自适应,布布扣,bubuko.com

xib中的view对iPhone和iPad自适应

原文:http://www.cnblogs.com/hereiam/p/3851369.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!