Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to disable auto layout by default for xcode 4.5?

A question here: Xcode 4.5 corrupting XIBs? illustrates the problem and solution for xcode 4.5 creating nib files that can not run on ios5.

Does anyone have a solution to prevent the auto layout checkbox from being defaulted to on? I'm worried that in the process of development, I will forget to unchecked that box.

enter image description here

like image 258
Mike Avatar asked Oct 03 '12 21:10

Mike


1 Answers

There's a way, but it's kinda convoluted and, I might add, not recommended.

You can open your template files located in:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/File Templates/User Interface/, in each directory, there are .xib files. They are XML files, open them with a text editor.

Replace the following line:

<bool key="IBDocument.UseAutolayout">YES</bool>

to

<bool key="IBDocument.UseAutolayout">NO</bool>

I will repeat though, this is not recommended.

like image 115
Simon Germain Avatar answered Oct 13 '22 21:10

Simon Germain