Question

Code: NSLog(@"[self view] = %@", [self view]);

Output: [self view] = <UIView: 0xca2bfc0; frame = (0 44; 320 588); autoresize = W+H; autoresizesSubviews = NO; layer = <CALayer: 0xca1d7e0>>

I tried to [[self view] setFrame:CGRectMake(0, 64, 320, 568 + 64)];, but view's frame is still frame = (0 44; 320 588). So I NSLog the [self view] to see if there is some autoresize constraints there. But don't know what does the above notation mean.

Was it helpful?

Solution

This is the log description of the UIView -autoresizingMask. Basically, it's the way you describe what subviews should do when the superview is resized. It's very powerful.

Your current rules tell the subview to resize width and height when the superview is resized, and to keep the distance above and below the subview static (in terms of the superview coordinate system).

OTHER TIPS

You can read that as:

This view will autoresize by stretching its width and its height.

This means that your current autoresizing mask is set to UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top