views:

84

answers:

1

In a view containing several subviews, one of the subviews should remain a fixed, non-zero distance from the top and bottom of the superview. In these images, this view is shown in gray:

Portait

Landscape

According to the documentation, this view should have a mask of UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth. However, this causes the view to expand its height to take over the entire superview. How can the view be contained to fixed, but non-zero margins? Thanks.

A: 
tc.
Thanks for the suggestion. Oddly, if I create a category with setBounds on UIView, and call super, I get, "-[UIView setBounds:]: unrecognized selector". Any idea why that would be?
David M.
Because a category is not a subclass. Boy, that was dense.
David M.
For "base-calling" in a category, see http://stackoverflow.com/questions/3487828/if-i-override-a-class-method-is-there-a-way-i-can-call-the-original-method-the/3490215#3490215
tc.