After several tries, I found the next to work the best :
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
if((toInterfaceOrientation == UIDeviceOrientationLandscapeLeft) || (toInterfaceOrientation == UIDeviceOrientationLandscapeRight)) {
NSLog(@”didRotateFromInterfaceOrientation Landscape”);
isPortrait = NO; //Global variable
}
else {
NSLog(@”didRotateFromInterfaceOrientation Potrait”);
isPortrait = YES;
}
