views:

105

answers:

3

Hi,

I have the following problem. I have an iPhone app and want to upgrade to universal When I do this, I get the expected MainWindow-iPad.xib. But the size of the window is hardcoded to 320x480. Also, there is no view in the window. I red, this should be automatically iPad-sized, so I am assuming I am doing something wrong. What exactly am I missing ? thanks in advance

A: 

You will probably also need to create a MainWindow-iphone.xib and MainWindow-ipad.xib.

St3fan
hmm. ok. xcode created the MainWindow-iPad.xib for me, right ?and I have the original mainWindow.xib.is that ok so far ?
HeikoG
A: 

Yes, the dimensions of a UIWindow object are hard-coded to the size of the iPhone screen. This confused me, too, until I realized there was an option to resize it: select the UIWindow object in the .xib in Interface Builder... in the Attributes pane, make sure the "Full Screen at Launch" checkbox is checked.

As St3fan says you'll probably want to have a specific main window .xib for your iPad build.

See my answer at:

http://stackoverflow.com/questions/3295000/uitabbar-unresponsive-on-ipad

Shaggy Frog
now im confused :-)I have this MainWindow-iPad.xib.Fullscreen on launch is enabled - but it still is 320x480. So a subview I add cant be bigger, right ?And btw: in the MainWindow-iPad.xib there also is my original viewcontroller. So when I launch the iPad emulator, it shows me basically the iPhone version in the top left corner of the iPad Simulator. ( at least it is still fully functional :-)Sorry if I dind't get the point :-)
HeikoG
+1  A: 

I got this. I fixed it by deleting the automatically created ipad xib, then opening the original xib in interface builder and choosing convert to iPad from the menu. Then ni saved it with the -iPad name and added it to the corredt target.

Amorya
hey, that did it - Thanks a lot.But one more thing >I have this MainWindow/iPad.xib and in mz plist is the main nib file base name iPad set to its name.But when I launch in iPad emulator, it still seems to load the iphone version into the upper left corner.
HeikoG
ok. I fixed it by creating a iPad Version of the ViewController with IB, then saved the classes, saved the nib and then build up the nib content of MainWindow-iPad.xib from scratch. thanks for all the help :-)
HeikoG