How to convert xcode 4.1 iPhone app in to Universal app

I recently developed an Application on iPhone in Xcode version 4.1.

Now I need to convert this app for iPad also.

I have verified so many links but all are regardig Xcode 3 ond it's extensions.

How to upgrade, how to resize the view etc etc Please help me. Thanks in advance


Okay, first open your project and click on the project icon, then select the icon below Targets. Select Summary from the right hand side, and change the Devices from iPhone to Universal (under the iOS Application Target). Now your app is ready for iPad. Now to modify the views, if you are not using XIB files, go to your view controllers viewDidLoad / loadView method and write the following code:

if(UI_USER_INTERFACE_IDIOM())
{
   // re-size your views here
}

And if you are using XIB files, go to your viewcontrollers XIB file, select the view(ie view window, label, buttons etc.) and select Show Size Inspector from Utilities. Now you can see Autosizing panel just under the origins and height-width menu. Select the arrows inside box to set autoResizeMask to get the desired size in iPad and then select the arrows outside the box to set the position in iPad. And that's it, hope this helps you :) Cheers!


Thanks everyone for helping me out. It turns out that this tutorial explained what I needed.

http://www.youtube.com/watch?v=RY-btZ-KjX0

It might be helpful for others.

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

上一篇: 在ipad中测试iphone应用程序?

下一篇: 如何将xcode 4.1 iPhone应用程序转换为通用应用程序