Pergunta

If starting a new project in Xcode 4.6 and when adding a button in a ViewController it is always followed by constraints. I have found that this project does not run on the iPhone 5 simulator (iOS5). On iPhone 6 simulator it runs ok. It is the constraints causing the crash. Removing the button and it runs ok on both 5 and 6 simulator. If I use an older Xcode (before the constraints) to start the project and continue with Xcode 4.6 the constraint are gone. But is there a way to disable the constraints from start in Xcode 4.6 to make a project run also with iOS5?

Foi útil?

Solução

you just need to go file inspector tab where will find the autolayout , then uncheck this. enter image description here

Outras dicas

Yeah that's called Auto Layout and was introduced in iOS 6.0 (and like any feature that's unsupported in a previous version of iOS, it crashes).

To disable Auto Layout on your nib file, see this blog article.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top