0

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

Shabib
  • 1,697
  • 4
  • 20
  • 39
jamil
  • 2,419
  • 3
  • 37
  • 64
  • 3
    Looks like a duplicate of: http://stackoverflow.com/questions/5580935/converting-iphone-app-to-a-universal-app-in-xcode-4 – Justin Paulson May 23 '12 at 13:51

2 Answers2

4

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!

Shabib
  • 1,697
  • 4
  • 20
  • 39
  • Thanx Dear @NoOnelsHere i try this..i already take first to convert Family to Both ipad/iphone.But the second step is little bit difficult for me.can u guide me whether i can do it for every Viewcontrollers XIB.? – jamil May 23 '12 at 14:10
  • Can i need new XIB ViewController For ipad also. – jamil May 23 '12 at 14:16
0

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.

Verbeia
  • 4,400
  • 2
  • 23
  • 44
jamil
  • 2,419
  • 3
  • 37
  • 64