Issue with xib files for iPad universal
I have a running iPhone app and I am trying to change it into an universal app in Xcode 3.2. I only want to create new xib files for iPad.
So I simply expand Targets click “ProjectUpgrade Current Target for iPad” and choose “One universal application”.
On my app I have a lot of xib files and I want to creat new iPad xib files for the same controller, for example I want to target mainpage-iPad.xib to the controller mainpage.m
In IB for the mainpage-iPad.xib I set the class to "mainpage", that seems to be not enough, whenever I run ipad simulator, I always get the view resized as iphone.
Can you point out what I am doing wrong and suggest the proper way to target the xib file to my controllers.
thanks
You can create iPad specific xibs very simple from existing standard iPhone xibs:
Menu
of Interface Builder select File
and Create iPad version
(or Create iPad version using Autosizing Masks
) ~ipad
suffix - eg if your iPhone xib is MyViewController.xib
your iPad xib should be MyViewController~ipad.xib
(use ~ipad
instead of -iPad
) After that your iPad xibs will be automatically used on iPad. Of course you will also need to upgrade your project to a Universal Application (just like you said).
链接地址: http://www.djcxy.com/p/95710.html上一篇: Xcode 4.2,将iPhone xib更改为iPad xib
下一篇: 问题与iPad通用的xib文件