i need to draw PortraitImage or LandscapeImage when my costomNavigation has been change to portrait or landscape.
A:
You need to override willRotateToInterfaceOrientation:duration: in your UIViewController. This will give you a call every time the app changes its orientation.
kasperjj
2010-06-18 10:37:31
did you mean UIViewController must send message to norify my customNavigationbar ?
RAGOpoR
2010-06-18 10:41:34
well, if you override that method in your UIViewController you will get a notice when the orientation changes and you can then do with that what you want depending on your apps architecture... but sending a message to your customNavigationbar would probably make sense :-)
kasperjj
2010-06-18 11:01:30
A:
You can detect orientation by using the UIDevice Class, as shown here:
You need to use the methods
- (void)beginGeneratingDeviceOrientationNotifications
and
- (void)endGeneratingDeviceOrientationNotifications
That should probably work.
Nick H
2010-06-18 14:16:26