I'm adding a UIView
to a UIWindow
that's not the keyWindow. I'd like the UIView
to rotate when the device rotates. Any special properties on the window or the view I need to set? Currently the view is not rotating.
I'm aware of the fact that only the first subview of the application's keyWindow
is told about device rotations. As a test I added my view to the first subview of the keyWindow
. This causes the view to rotate. However the view being a subview of the keyWindow
's first subview won't work for various aesthetic reasons.
An alternative approach is observing device orientation changes in the view and writing the rotation code myself. However I'd like to avoid writing this code if possible (having an additional window is cleaner in my opinion).