Ok finally figured it out how to do that. It fairly simple. It is done by a use of UIDevice class which provides notifications for device orientation. Here is how I implemented view transitions when device changes orientation without UIView's self autorotate methods. Hope someone finds this useful.
Code:
- (void)applicationDidFinishLaunching:(UIApplication *)application {
[window addSubview:tabBarController.view];
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(didRotate:)
name:@"UIDeviceOrientationDidChangeNotification"
object:nil];
if ([self isDataSourceAvailable] == NO) {
return;
}
}
- (void) didRotate:(NSNotification *)notification
{
UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
if (orientation == UIDeviceOrientationLandscapeLeft || orientation == UIDeviceOrientationLandscapeRight)
{
//view transition code in here
}
}
BR,
Jume