码迷,mamicode.com
首页 > 其他好文 > 详细

xib中的view对iPhone和iPad自适应

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

标签:io   for   re   c   new   ar   

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自适应

标签:io   for   re   c   new   ar   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!