Yes, it can be done.
If you set the translatesAutoresizingMaskIntoConstraints = YES setFrame: calls will automatically translate at run time into layout constraints based on the current autoresizingMask . This allows you to mix the frame layout with the constraint based layout.
For example, you can use Auto Layout to determine the layout of all subzones of a view, but still call setFrame: to set the size and position of the view itself. From your point of view, you are making a layout with a combination of automatic layout and direct frame processing. But the system actually uses restrictions to handle everything.
However, there is one big caveat about using translatesAutoresizingMaskIntoConstraints .
When you do this, you still need to make sure that these automatic constraints can be satisfied by the rest of your constraints.
So, suppose that there are already limitations that determine the size and position of your view, and then you also set translatesAutoresizingMaskIntoConstraints = YES and call setFrame: Calling setFrame: will create new constraints on the view, which are likely to conflict with existing constraints.
(Actually, this error happens often. If you ever see a log message complaining about conflicting restrictions, and one of these restrictions is NSAutoresizingMaskLayoutConstraint , then what you see is an automatic limit conflict. This is a simple error, because translatesAutoresizingMaskIntoConstraints = YES is the default, so if you are setting restrictions on the code, you need to forget to disable it if you do not need these automatic restrictions.)
In contrast, suppose that there are already limitations that determine the size and position of your view, but then you set translatesAutoresizingMaskIntoConstraints = NO before calling setFrame: In this case, your calls to setFrame: will not create new constraints, so there will be no conflict between the individual constraints. However, in this case, there is still a βconflictβ between the restrictions and the set frame value. The next time the automatic layout is called, it will see the existing limitations in the view, calculate the required frame value and set the frame to the desired value, resetting the value that you set manually.
For more information, see "Accept Auto Layout" in the Apple Cocoa Auto Layout Guide .