Search code examples
iosxcodedebuggingautolayout

What does autoresize = RM+BM mean?


I get this when using the Xcode debugging console with this line:

po [[UIWindow keyWindow] recursiveDescription]

Then I get back lines with the recursive description like this

<UILabel: 0xb0b8170; frame = (138 106; 200 15); text = 'Distance'; clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; layer = <CALayer: 0xb0b8220>>

What does "autoresize = RM+BM" and is there a place I can lookup the meaning of the letters? I also saw something like this "autoresize = LM+W+RM+TM+H+BM".


Solution

  • autoresize indicates which bits have been set in the autoresizingMask:

    RM = UIAutoresizingFlexibleRightMargin
    BM = UIAutoresizingFlexibleBottomMargin
    

    The others follow a similar abbreviation syntax.