views:

502

answers:

1

I'm drawing three rectangles, one of which falls off the end of the view, (i.e. the drawing is bigger than the current view bounds) so you don't see the right edge. This is good, but when the view is rotated, the right edge is still clipped, even though there's plenty of room to draw it. How can I get the view to redraw the full rectangle?

I've tried:
1) changing the frame and bounds rectangles to bigger
2) calling setNeedsLayout
3) calling setContentMode:UIViewContentModeRedraw;
4) calling [self.view setClipsToBounds:NO]

Trying a CGLayer is next, unless somebody suggests something else.

-Owen

A: 

Make sure your autoresizing mask on this layer is set properly in IB. If its not stretching the right way on rotation then the view will not take the new shape of the screen.

Squeegy
Squeegy - thank you!That was it - I hadn't noticed the interior arrows on the autoresize widget - that's all it took. I spent the weekend trying to figure it out - you saved me a couple of days at least!Thanks again!-Owen
Owen Hartnett