Tanya Prashar
Tanya Prashar

Reputation: 27

App not running in ios 5

Since i want the app to run in both ios 5 as well as in ios 6 ,I am trying to run the app in ios 5 which is working perfectly in ios 6 as i have used the autolayout feature but when i use to run the app in ios 5 it crashes since autolayout feature is not available in previous versions of ios .Is there any solution to fix out my problem ? Answer will be appreciated.

Upvotes: 0

Views: 175

Answers (4)

Yashesh
Yashesh

Reputation: 1762

If you want to run your app in iOS 5 then you have to turn off the Autolayout feature. You can do that from Interface builder.

For more help you can refer this.

Upvotes: 2

IronManGill
IronManGill

Reputation: 7226

If you are using iOS 6 or later , then u can create a separate xib for the iphone 5 called Retina 4 Full screen. You need to check this in your ViewController Size. Also to check for for both of these xib's . That means to run either of your xib's in iphone 5 or lower versions use these conditions whether in the AppDelegate or wherever you need to show another ViewController.

CGSize result = [[UIScreen mainScreen] bounds].size;
if(result.height == 480)
{
}
else if(result.height == 568)
{
}

the above code would check for the size of your iphone's screen and accordingly adjust. Hope this has cleared your issues :).

PS:- Dont forget to add your iphone 5 splash screen i.e [email protected].

Upvotes: 0

AppleDelegate
AppleDelegate

Reputation: 4249

enter image description hereYou have to use AutoResizing mask for your view instead of autolayouts since autolayouts are supported iOS 6 onwards.Check the example below

Upvotes: 0

Manu
Manu

Reputation: 4750

  1. You Need to unCheck the Auto Layout.

enter image description here

  1. And make sure you are changing here also.. select ios 5.1

enter image description here

Upvotes: 0

Related Questions