UIViewAutoResizingMasks is what we call "struts" and "springs". Consider this: you have a large square with a small square inside. To keep this square perfectly centered, you must set a fixed width from each inner edge of the large square to limit it. These are racks.
Springs, on the other hand, is more like a UIView during rotation. Say our gaze should remain at the bottom of the screen, centered (like the UIToolbar). We want to keep it top spring flexible so that when you rotate the view from 460 px to 320 px, it will keep it in the same position relative to the screen, which is now changing. Selecting one of these springs in IB is equal to setting the corresponding UIViewAutoResizingMask and highlighting the top spring, in particular, akin to calling myView.autoResizingMask = UIViewAutoresizingFlexibleTopMargin .
Values can be used in tandem by enclosing them in a pair of brackets and using the operator or, for example, myView.autoResizingMask = (UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleLeftMargin)
Masks tell you numbers because they are typdef NSUInteger, and the flags that apple assigned to them. Cmd + click on one to see its defintion method.
CodaFi May 6 '12 at 5:54 2012-05-06 05:54
source share