iphone转通用,xib里面的view怎么改成ipad大小?

iphone转通用,xib里面的view怎么改成ipad大小?

iphone转通用,xib里面的view怎么改成ipad大小?我用iphone的xib复制了一份改的,xib的view的宽高都是灰的,不能修改,都是iphone大小的,我新建一个ipad的xib倒是大的,不过也不能改大小,对比属性也没看到有什么设置的阿,求解。


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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值