at initial UIImageView i have set it to
mCurrentImageView.contentMode = UIViewContentModeLeft;
so if the device rotate i will change contentMode
but it had no effect. how can i fix it?
if ([UIDevice currentDevice].orientation == UIInterfaceOrientationLandscapeLeft || [UIDevice currentDevice].orientation == UIInterfaceOrientationLandscapeRight) {
mCurrentImageView.contentMode = UIViewContentModeScaleAspectFit;
}
[UIDevice orientation] does not return those identifiers for orientation. From the documentation, that message will return the following:
To change the content mode you should do something in the view controller code in the willRotate message: