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.