tags:

views:

201

answers:

2

I have an iPhone app that I'd like to convert to an iPad app. To do so, I "Upgrade(d) Current Target for iPad", and then I got a new xib, "MainWindow-iPad.xib". I was building to iPhone/iPad, and correctly had the iPad main window xib set in info.plist. However, when I opened the MainWindow-iPad xib, I was presented with an iPhone-sized window, instead of an iPad-sized window as I expected. Is there something I need to do after upgrading to change the xib, or do I need to resize views somewhere? Because when I run the app, it seems as if XCode is trying to run an iPad view with an iPhone-sized xib.

Thanks for any help in advance.

A: 

I don't know the answer I am afraid, but I do have the same problem if anyone knows the fix.

I am going to investigate myself and will post back here if I find an answer.

Ok my bad - I had some custom resize code in one of my views (legacy stuff from way back when I was just starting out the iPhone dev and didn't know what I was doing).I removed it and things started working.I also set the "resize the full screen" property to "checked" on the UIWindow component in my main XIB but I don't know if that had any effect.Perhaps check your one code for places where you might be setting the frame size?
A: 

I think there's a bug in the "Upgrade Current Target for iPad" task.

I fixed this issue by creating a new "Window XIB" with iPad as the product, then replacing the Window object in MainWindow-iPad.xib with the Window object in the new XIB. (Be sure to update the "window" outlet of your app delegate.)

brainfsck