Reputation: 6143
In my AppDelegate, I have an uiwindow like this. Inside that, there are uiimageview as background.
Problems is that those Imageview aren't rotated when iPad is rotated and status bar is also in landscape position already. May I know how to do?
Edited: If I listen to orientation change, my image view is rotated but I want to set that image view to the origin (0,0) of device. However, it look like uiwindow is offset in horizontal position. Now, I am setting origin of image view as origin of uiwindow. Then, my image view is also offset. How shall I do?
Upvotes: 0
Views: 347
Reputation: 26383
That's the correct behavior. UIWindow objects doesn't support rotations.
To do that, you should rotate them by yourself listening to UIDeviceOrientationDidChangeNotification
notification.
Managing rotation in a window is a little bit tricky, also because during rotation animation you should be able to detect the rotation direction to make a good user experience.
In my opinion is better if you embed you image views in a view of a view controllers.
Upvotes: 1