iOS 7 - Auto Layout on iOS Versions prior to 6.0
2015-06-19 19:53
661 查看
链接地址: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.
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
iOS 7 - Auto Layout on iOS Versions prior to 6.0
up vote42down votefavorite 7 | I have an iOS app that 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 an 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 an 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
| ||||||||||||||||||||
|
7 Answers
activeoldestvotesup vote76down voteaccepted | Your problem is that the "Deployment Target" for your project is "5.0" and you are using a feature that isn't available for iOS 5. Check the "General" tab for your build target and update it to at least 6.0 to use Auto Layout
| ||||||||
|
up vote39down vote | In your .xib file in Xcode 5, click on the offending control. Go to the properties menu on the right and click on the "File Inspector" tab. It is the tab that looks like a sheet of paper. On that tab, there is a section called "Interface Builder Document". Make sure "Builds for" property is set for "iOS 6.0 and Later". If none of the other fixes above have worked, this is likely your culprit.
| ||||||||||||||||
|
up vote13down vote | There is very simple fix. You have just to uncheck "Use Auto Layout" in 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/
| ||||||||||||||||
|
up vote7down vote | Assuming you are actually targeting only iOS 6.0+, it sounds like an issue related to upgrading Xcode. Sometimes, things can go awry when transitioning to a newer Xcode version. Here are some general tips you 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 you can now
| ||||||||||||
|
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 through above doc, and check "What's new in iOS6.0" and serach for "Auto layout" https://discussions.apple.com/message/19879144#19879144
| ||
add a comment |
up vote1down vote | This works for me..please try from classname.xib file in Xcode 5, tap on the offending control. tap on "File Inspector" tab. On that tab,Make sure "Builds for" property is set for "iOS 6.0 and Later".This will help you :)
| ||
add a comment |
up vote0down vote | The problem may be because of target version in of your project,it may be 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.
|
相关文章推荐
- 微软憋大招:Win10上跑安卓、iOS应用
- iOS 笔记
- 总结iOS 8和Xcode 6的各种坑
- IOS开发学习实例之三---应用管理器
- iOS学习 plist读取和写入文件
- iOS 8 AutoLayout与Size Class
- 七款Debug工具推荐:iOS开发必备的调试利器
- Xamarin iOS教程之进度条和滚动视图
- 用命令行管理iOS证书
- IOS成长之路-Nsstring搜索方法rangeOfString
- IOS小知识点17nil Nil NULL NSNull
- ios 画图总结
- IOS pickerView 使用
- IOS 多线程
- IOS 资源文件的读取
- 适配iOS9(ATS问题)
- 苹果开发者账号(公司级)和邓白氏编码(D-U-N-S)申请记录(2015.06)
- Xamarin iOS教程之进度条和滚动视图
- 手机号码去掉‘86’或‘+86’及点击备注崩溃解决办法
- IOS手势解锁