iPhone SDK 3.2 Universal App issue with .xib files

Posted by Wesley on Stack Overflow See other posts from Stack Overflow or by Wesley
Published on 2010-04-09T21:43:28Z Indexed on 2010/04/10 21:03 UTC
Read the original article Hit count: 524

Filed under:
|
|
|

Hello! So I am finding this process of universalizing my iPhone app to be a big headache! Am I alone in this? I sure hope not. Anyway, my question is regarding the .xib files for my universal application.

I had my iPhone OS 3.1 running app all ready to make the universal switch. I went up to Project/Upgrade Current Target for iPad/Universal Application and it supposedly made my app have all the necessary iPad settings...

So when I went to test it in 3.2 SDk, the screen was big, meaning the toolbar was sized correctly for the iPad, but the image that was being displayed was for the OS 3.1, meaning it was way small. So I then went to the iPad Source folder, changed the name of my MainViewController.xib file to MainViewController-iPad.xib, and inserted the bigger image I had prepared for the iPad, and it still didn't work correctly.

Then, I went into my MainViewController.m file and changed the nib reference from MainViewController to MainViewController-iPad, and it worked! My only concern is that being that I had to "hard-code" it in, or force it to read from my -iPad file, is that going to present issues for the OS3.1 version? I can't go back and test the 3.1 version now for some reason, the option was removed from the Active SDK menu...

If there is anyone out there that has experienced this, or has insight into what I am doing wrong, your help would be greatly appreciated. Thank you!

© Stack Overflow or respective owner

Related posts about ipad

Related posts about xib