Where to set translatesAutoresizingMaskIntoConstraints in Xcode 4.5

Jon Cox picture Jon Cox · Jan 7, 2013 · Viewed 31.6k times · Source

I need to set translatesAutoresizingMaskIntoConstraints to NO. By default it is set to YES (to assist with the majority of apps that are transitioning from struts and springs to the new Auto Layout).

Is there somewhere in Xcode where the default can be changed from YES to NO?

Or do I have to manually set it for every view?

Answer

CocoaBob picture CocoaBob · Jan 29, 2015

I'm late to this question, but the mentioned option is still missing in Xcode 5 & 6, so the question is still meaningful.

Actually, we can always set a value to any property of a view/control/object by adding a User Defined Runtime Atribute in Storyboard (Interface Builder) like the following screenshot.

And it also works for translatesAutoresizingMaskIntoConstraints. So the question could be solved.

enter image description here