-1

When I am using Xcode 5 and I set the deployment target as 7.0, the application runs perfectly with both 4-inch and 3.5-inch displays.

I have downloaded the iOS 6 SDK already.

When I change the base SDK to iOS 6 and set the deployment target as iOS 6.1 my GUI is affected in a way that changes every image, navigation bar, images and all other controls.

I am not using autolayout and have two .xib files for one UIViewController in each class.

So, how can I get fix this?

Thanks in advance.

BytesGuy
  • 4,097
  • 6
  • 36
  • 55
JohnWick
  • 241
  • 2
  • 13

5 Answers5

0

When you compile with the iOS 6 SDK , you application is created with the iOS6 images, views, keyboards, etc...

You can't use iOS7 views if you are compiling for iOS6, you need to compile for iOS7, even thought your app is iOS6 compatible (setting the deployment target to iOS6)

Antonio MG
  • 20,382
  • 3
  • 43
  • 62
0

When compiling for iOS 7 you are using iOS 7 specific GUI elements (that differs a lot from iOS 6). Phones that are still on iOS 6 (about 16%) will however see the iOS 6 GUI elements for obvious reasons, even if you compile it for iOS 7.

There is really no way to resolve this, you should simply develop for iOS 7 and let iOS 6 users still have iOS 6 GUI elements.

Daniel Larsson
  • 6,278
  • 5
  • 44
  • 82
  • it is not possible i cant leave it sir i have to do in anyway please suggest – JohnWick Jan 09 '14 at 05:36
  • You have three options: 1) Create a separate iOS 6 design, 2) Set iOS 7 as deployment target so that iOS 6 users can not use your app, 3) Create your own GUI elements. Other than that, I am sorry to tell you that there is no way. – Daniel Larsson Jan 09 '14 at 09:38
  • ok if i take 1st option then how to put conditional statement for checking that is this device is belong to ios7 and have 4/3.5 inch retina display now u can help me – JohnWick Jan 09 '14 at 10:20
  • Refer to this question: http://stackoverflow.com/questions/19186189/xcode-detect-ios-version-and-show-storyboard-accordingly – Daniel Larsson Jan 09 '14 at 11:19
0

Long story short - you can't use iOS 7 GUI in your iOS 6 app. If you want you can just create your custom GUI and use it in your app. But some elements will be different, you better read this guide:

Also if you build you app for different versions of iOS you better use auto layout:

Some issues of transition from iOS 6 to iOS 7:

Community
  • 1
  • 1
Vlad Z.
  • 3,401
  • 3
  • 32
  • 60
0

Use this code:

if([[[UIDevice currentDevice] systemVersion] isEqualToString: @"7.0"])
{    
    //do stuff 
}
else
{ 
  // code here
}
BytesGuy
  • 4,097
  • 6
  • 36
  • 55
Lait kumar
  • 112
  • 5
  • This is BAD!. It will only work for iOS 7.0 and not for any subsequent update. Use the method that Apple suggests at https://developer.apple.com/library/ios/documentation/userexperience/conceptual/transitionguide/SupportingEarlieriOS.html – Kerni Jan 08 '14 at 11:10
-2

If your application is working fine in iOS 7 and you need to run it iOS 6 then you need to manage the application using this method:

if ([currSysVer compare:reqSysVer options:NSNumericSearch] != NSOrderedAscending){
    //CGRect gridFrame;
    if ([[UIScreen mainScreen] bounds].size.height == 568) {
       // Do nothing if already managed
    }else{
       // Do nothing if already managed
    }
}else{
    //CGRect gridFrame for ios6;
    if ([[UIScree`enter code here`n mainScreen] bounds].size.height == 568) {
        //Manage frame here 
    }else{
       //Manage frame here 
    }
}
BytesGuy
  • 4,097
  • 6
  • 36
  • 55