Link Address: http://stackoverflow.com/questions/18735847/ios-7-auto-layout-on-ios-versions-prior-to-6-0
Stack Overflow is a question and answer site for professional and enthusiast programmers. It ' s 100% free, no registration Required.ios 7-auto Layout in IOS Versions prior to 6.0
| Up vote42down votefavorite7 |
I have a iOS app that is worked well on all devices in iOS 6. I recently upgraded my Xcode to version 5.0 and tried to build the same app for IOS 7 on a IPhone 5. On building the app, the XCode upgraded something in the code settings, but failed to build with errors. On the IPad XIB, I get a error: "Illegal configuration:auto Layout on IOS Versions prior to 6.0". I tried enabling and disabling the "Use AutoLayout" checkbox in the File Inspector, but it didn ' t work. Please help me fixing this issue. iOS AutoLayout iOS7
| ShareImprove this question |
Edited Sep "at 4:54 |
Asked Sep one ' at 8:08Metsburg 1,30217 |
|
|
| auto Layout is not suppor Ted before IOS 6. "Fix This Isse": 1) don ' t use it. 2) require IOS 6. – david rönnqvist sep One ' at 9:19 |
|
|
|
"Auto Layout is not supported before IOS 6" ... I am not using anything before iOS 6, i m using iOS 7. Is it not compatible? –metsburg Sep One ' at 9:31 |
|
|
I said I upgraded my xCode to 5.0, what did you edit the tag to IOS 5? –metsburg Sep One ' at 9:33 |
|
|
"Prior to iOS 6" is iOS 5–david rönnqvist Sep One ' at 9:33 |
|
|
But I'm not using it, that's the point. –metsburg Sep One ' at 9:33 |
Show6More comments |
7 Answersactiveoldestvotes
| Up vote76down voteaccepted |
Your problem is the ' Deployment Target ' for Your project is ' 5.0 ' and you are using a Featu Re that isn ' t available for IOS 5. Check the ' General ' tab for your build target and update it to @ Least 6.0 to use Auto Layout
| shareimprove this answer |
answered sep one ' at 9:45 David rönnqvist 31.8k 1382124 |
|
|
|
|
Yes, but the same code, when compiled in Xcode 4.6.3, works fine. EVEVN with deployment target as low as 4.3. –metsburg Sep One ' at 10:17 |
|
|
Agreed. I tried that and didn ' t see the error despite setting the deployment target to 5.0–max MacLeod Sep one ' at 10:20< /c3> |
Add a Comment |
| Up vote39down vote |
In your. xib file in Xcode 5, click on the offending control. Go to the Properties menu in the right and click on the "File Inspector" tab. It is the tab, the looks like a sheet of paper. On the tab, there is a section called "Interface Builder Document". Make sure ' Builds for ' property was set for "IOS 6.0 and later". If none of the other fixes above has worked, this is likely your culprit.
| ShareImprove this answer |
answered Sep ' at 23:57Christine 55038 |
|
|
|
|
NOTE---If anyone is searching for this, I answered after the conversation were completed. This is the answer for this problem if the above does not fix it. I hope I can help you. ----–christine Sep ' at 17:52 |
|
|
This is the fixed it for me. The original value is Project Deployment (which I already set to 6.0) but it still didn ' t work with that setting. –radj Sep at 8:09 |
|
|
I was had this same problem after updating Xcode. This worked perfectly for me. –ghostshaman Oct One ' at 18:12 |
|
|
This works for me. –tony Xu Nov ' at 0:29 |
Add a Comment |
| Up vote13down vote |
There is very simple fix. You have the just to uncheck ' Use Auto Layout ' in the General tab. More Information http://shreekantpawar.com/2012/12/20/ simple-solution-to-auto-layout-on-ios-versions-prior-to-6-0-error-in-mac-osx-10-7-and-later/
| ShareImprove this answer |
Edited Oct 4 ' at 19:23 |
answered Sep at 18:33Anton Sivov 37729 |
|
|
|
|
But ... but...then cant use AutoLayout anymore! The cure is worse than the desease! –katzenhut Oct "at 13:54 |
|
|
Agree. I ' ve refactored all views in XCode 5 editor. –anton Sivov Oct @ 11:14 |
|
|
This is what the worked for me. Although it is isn't in the general Tab, it's in the the File Inspector tab.–chuck krutsinger Nov "at 3:58 |
|
|
Thank you Work...–yug June 2 ' in 13:35 |
Add a Comment |
| Up vote7down vote |
Assuming you is actually targeting only IOS 6.0+, it sounds as an issue related to upgrading Xcode. Sometimes, things can go awry when transitioning to a newer Xcode version. Here is some general tips can try:
- Clean the project (press CMD + Shift + K)
- Reset the Simulator (IOS Simulator menu item, "Reset Content and Settings")
- Restart Xcode
- Try building again, hopefully can now
| ShareImprove this answer |
answered Sep one ' at 10:17jrg-developer 4,9341 |
|
|
|
|
no, that's doesn ' t work. And I ' m actually targeting IOS 5.0+. Does that mean we've had to change minimum deployment Target? – metsburg sep" at 10:26 |
| without going into much D Etail of Xcode 5 (I am under NDA ...), it seems like it's now + difficult to support IOS 5+. Apple seems to is strongly encouraging developers to support IOS 6+ only. IOS 7 makes some pretty radical changes in places that has made it difficult to even support 6.0+ ... to this regard, we H Ave dropped support for IOS 5 entirely. – jrg-developer Sep one ' at 10:29 |
|
|
|
Yes, agreed. I tried a few things but the only valid option seems to be upgrading the minimum deployment target. –metsburg Sep One ' at 11:00am |
Add a Comment |
| Up vote1down vote |
AutoLayout is a feature of iOS6.0 and later, If you need to support IOS 5, don ' t use auto layout. https://developer.apple.com/library/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS6.html#//apple_ref/doc/ Uid/tp40011812-sw1 Please go to through above doc, and check "What's New in iOS6.0" and serach for "Auto layout" https://discussions.apple.com/message/19879144#19879144
| ShareImprove this answer |
answered Dec ' at 11:52Gaurav borole 1491 |
|
|
Add a Comment |
| up vote1down vote |
This works for me: Please try to classname.xib file in Xcode 5 and tap on the offending control. Tap on "File Inspector" tab. On this tab,make sure "Builds for" property was set for "IOS 6.0 and later". This would help you:)
| shareimp Rove this answer |
answered jun at 7:28 vinu David Jose 314 |
|
| &NBSP; |
Add a comment |
| up vote0down vote |
The problem is because of target version in the your project,it is 5.0 I guess. There is a solution for this problem Step1. Select your project Step2.select the General tab Step3.change the project deployment target.
| shareimprove this answer |
answered jun at 12:22 RAHULKR 101 19 |
|
iOS 7-auto Layout on iOS Versions prior to 6.0