52

In Xcode 4.3 I'm not seeing the "Autoresizing" panel (with the red crosshair things) in the Attributes Size Inspector.

What I see instead are two panels, one titled "Content Hugging Priority" and the other titled "Content Compression Resistance Priority".

Other than baffling me, they seem to no effect on anything if I adjust their settings.

In projects started before 4.3 installation I still get the Autoresizing red line things, but for 4.3 created projects I am currently unable to control the location and size behavior of view controls.

PZX
  • 529
  • 1
  • 4
  • 7

2 Answers2

110

For Xcode 4.3 auto layout is enabled by default. To disable deselect the "use auto layout" option in the file inspector tab.

file inspector tab

https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/WhatsNewXcode/Chapters/xcode_4_0.html#//apple_ref/doc/uid/TP40016147-SW2

ThomasW
  • 16,981
  • 4
  • 79
  • 106
  • 5
    @PZX OK. If this answers your question, please check it as the answer. – ThomasW Feb 21 '12 at 00:44
  • I was searching for hours. Thank you very much. – JackPearse Apr 12 '12 at 11:34
  • 4
    It is not obvious from the screenshot where this checkbox is (bad cropping). I have found it in File Inspector tab (the first one) on the right panel of Interface Builder. It doesn't matter what element you have selected. – Simon Perepelitsa Apr 21 '12 at 09:55
  • OK, the REALLY CRUMMY thing is, you have to set this on EACH of your NIB files. Can't you set that as a global default? – Jay Imerman Nov 02 '12 at 14:14
23

In Xcode 4.5 you need to go to file inspector to uncheck the Use Autolayout, then go back to Size inspector, the good old Autosizing is back where it was. :) Don't you just hate that when then change things like that behind your back, precisely what Microsoft would do!

Rich4321
  • 231
  • 2
  • 2
  • 2
    The file inspector is the first top level button in the right hand Utilities pane. The icon is shaped kind of like an SD card. – funroll Oct 29 '12 at 06:34