I have an iPad application with UIToolbars on the top and bottom, with UIBarButtonItems in them. I want the icons in the bar buttons to rotate with didRotateFromInterfaceOrientation:. I found a resource for rotating buttons using a CGAffineTransform and the transform property of a UIButton, but UIBarButtonItem does not have that property. Apple does it in the Camera app on iPhone, so I know it's possible in buttons, but maybe not in bar button items. I do not want the toolbars to move on device rotation.
Right now I'm in the process of trying it with a UIButton. How do I detect when the device orientation has changed without returning YES in shouldAutorotateToInterfaceOrientation:? If I have YES in there for other orientations, the toolbars move to landscape positions, but I am able to get the state change from didRotateFromInterfaceOrientation:. If I return NO, I don't get anything from didRotateFromInterfaceOrientation: because the user interface does not rotate.
Any help would be appreciated.
Thanks.
Right now I'm in the process of trying it with a UIButton. How do I detect when the device orientation has changed without returning YES in shouldAutorotateToInterfaceOrientation:? If I have YES in there for other orientations, the toolbars move to landscape positions, but I am able to get the state change from didRotateFromInterfaceOrientation:. If I return NO, I don't get anything from didRotateFromInterfaceOrientation: because the user interface does not rotate.
Any help would be appreciated.
Thanks.