Convert iPhone app to iPad XIB File Problem

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.


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.)


I had the same problem and the window size was wrong in the mainWindow.xib.

I had manually converted a I-Phone project to an I-Pad project. I resized all my views, but couldn't change the size of the window. It appears that you can have views bigger than the window, and the only thing that happens is that buttons outside the window don't work. that of course is dependent on the rotation of the I-Pad.

From the Interface builder, the size is greyed out in the mainWindow info. I opened the mainWindow.xib as text, changed the size to 768 by 1024, saved, cleaned and rebuilt. Unexpected errors occurred until I exited from the Xcode and IB and restarted. The next build worked just fine, and the buttons now work.

It's probably the wrong way to fix the problem, but it works

链接地址: http://www.djcxy.com/p/95700.html

上一篇: 升级iPad的当前目标

下一篇: 将iPhone应用转换为iPad XIB文件问题