Question

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

Was it helpful?

Solution

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(i.e 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!

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top