views:

75

answers:

2

I have a notification view which I'm adding to the application's window after launch, so it hovers above all other views.

When the user rotates the device, the view does not autoresize like those owned by a UIViewController.

Is there a way to manually ask for the view's autoresizingMask to be applied? Or, alternatively, how can I have a view with no view controller be resized on device rotation?

A: 

autoResizingMask doesn't have anything to do with rotation per se. It just defines how the view should be sized when its superview is resized.

It should work if you add a top-level view controller, with a view the same size as the window and which contains all other views. Then your notification view will be a subview of the toplevel view (connected to a view controller), and should autorotate.

Brian
A: 

Did you set:

view.autoresizesSubviews = YES;

in the appropriate superview?

hotpaw2