0

Possible Duplicate:
Enabling auto layout in iOS 6 while remaining backwards compatible with iOS 5

My boss want me do to an App compatible with iPhone 5/4/4S and iOS 6/5

Is it possible ?

Will i be able to use NSLayoutConstaint ?

Community
  • 1
  • 1
Pwyll28
  • 117
  • 11
  • http://stackoverflow.com/questions/12411980/enabling-auto-layout-in-ios-6-while-remaining-backwards-compatible-with-ios-5 – EagerMike Jan 09 '13 at 16:11
  • 1
    @jammycoder That is not a duplicate. While very useful, it only addresses half of this question. – rmaddy Jan 09 '13 at 16:14
  • @rmaddy wasn't meaning to be a duplicate, just thought it would be good info – EagerMike Jan 09 '13 at 16:15
  • @jammycoder Sorry, someone voted to close this as a dupe to the same question you referenced. I mistakenly thought it was you. – rmaddy Jan 09 '13 at 16:17

2 Answers2

2

You can create a single app that supports anywhere from iOS 4.3 on up and it will work on all devices that supports iOS 4.3 or later (or 5.0 and later if you choose).

However, NSLayoutContraint is only in iOS 6.0 and later. You will need to use other mechanisms for the app to support iOS 5.x.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
1

Nope, not possible. NSLayoutConstaint are only available on iOS 6. You still can use Autoresing mask for layout purpose on iOS 5

Yaman
  • 3,949
  • 4
  • 38
  • 60
  • But for devices on ios6, how my components will adapt automatically depending on the device's screen height ? – Pwyll28 Jan 09 '13 at 16:13
  • @Pwyll28 The same way apps have have adjusted screen sizes since iOS 2.0 - using autoresizing masks and programatic layout. All of that still works under iOS 6. – rmaddy Jan 09 '13 at 16:18
  • Do I really need to do that ? Can't i just convince my boss that now everyone is using iOS6 ? – Pwyll28 Jan 09 '13 at 16:24
  • You can still try but you know ... he's the boss so good luck :D Btw, i was the first to answer but you accepted another one :( – Yaman Jan 09 '13 at 17:57
  • Sorry for the validation, but his answer was more... complete :( Next time i promiss :P – Pwyll28 Jan 10 '13 at 12:38