Frage

I surfed Internet for few hours, before posting this Question. Here I Go:

I am Working on an app. I used X-Code 5. set the deployment target iOS 7.

I have almost completed the UI for the app (for iOS 7). Yesterday, my Team Leader told, that Client wants the app backward Compatible, that is It should work on iOS 6.1 too.

SO I started surfing the Internet(as my Team Leader too don't know how exactly to accomplish it). I found some Links, but was confused what exactly to do. Yes, I read post on stackoverflow and google too.

How can I make my app iOS 6 compatible too? DO I need to take different XIB files? (It will be too much work).

One thing I did, I set the deployment Target iOS 6.1 or Later. The app ran on the Device. Interestingly the app ran on iOS 7 too. But on iOS 7, the view was Distorted a little.

And I heard If the Deployment is at 6.1 you cannot upload it to the App Store. Moreover I set The deployment at 7.0, but then I could not run it over iOS6 Device.

How should I develop the app, so that It works for iOS 6,7 and gets upload on AppStore too.

PLease help. I have been working on Developing Apps from last 4 months. I have been trying Mu best. I know, this question might seems stupid for some people.

And am not using Storyboards. Am using XIB's only

War es hilfreich?

Lösung

No need to create separate xib files for iOS6. You need to set the UI for iOS7 as well as iOS6.

  1. Just open your storyboard and then click on assistant editor.
  2. Now open storyboard preview in assistant editor.
  3. There is a button in assistant editor at right hand bottom corner which says iOS7 or later, click on it and select iOS6 or earlier.
  4. Now you can see the UI for both iOS7 and iOS6 side by side on the screen.
  5. Now select a particular view controller and then select size inspector.
  6. In size inspector you just need to set the iOS6/7 Deltas for iOS6 screens. That's it.

Main UI difference in iOS 6 and iOS 7 is that status bar is included inside the viewcontroller in iOS 7. it means your view controller is 20 px greater than iOS6. you have to adjust your items. Design your items according to iOS 7 and set Δy to -20

enter image description here

check this url too : https://developer.apple.com/library/IOs/documentation/UserExperience/Conceptual/TransitionGuide/SupportingEarlieriOS.html

If you have any problem then let me know.

Andere Tipps

So many questions...:

1.DO I need to take different XIB files?

No

2.One thing I did, I set the deployment Target iOS 6.1 or Later. The app ran on the Device. Interestingly the app ran on iOS 7 too.

It is as it should be

3.But on iOS 7, the view was Distorted a little.

It is because of transfluent status and navigation bars.

4.And I heard If the Deployment is at 6.1 you cannot upload it to the App Store.

You can. You have to support iOS 7. 6.1 - is a minimal required version. So everything is ok.

5.Moreover I set The deployment at 7.0, but then I could not run it over iOS6 Device.

If minimum is 7.0 you can not run it over 6.1. You are right :)

6.How should I develop the app, so that It works for iOS 6,7 and gets upload on AppStore too.

If compiler shows you some compatibility warnings you should fix them. Also when your application runs over 7.0 it should have iOS7.0 style. (no one cares how it will look on iOS 6.1 devices).

UPDATE:

How can I set Delta?

If you create your GUI programmatically define

//Screen height
#define SCREEN_HEIGHT ([[UIScreen mainScreen] bounds].size.height)
#define SCREEN_35 (SCREEN_HEIGHT == 480)
#define SCREEN_40 (SCREEN_HEIGHT == 568)

and then use it following way

UIView *newView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, SCREEN_40 ? 200 : 100)];

If you are using Xib or Storyboard

enter image description here

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top