Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UITabBar orientation trigger not working in viewcontroller.
- // I create the view controller attached to the fourth item in the TabBar
- contact *fourthViewController= [[contact alloc] init];
- localNavigationController = [[UINavigationController alloc] initWithRootViewController:fourthViewController];
- [localNavigationController.tabBarItem initWithTabBarSystemItem:UITabBarSystemItemContacts tag:4];
- [localControllersArray addObject:localNavigationController];
- [localNavigationController release];
- [fourthViewController release];
- [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];UIInterfaceOrientation orientation = [UIDevice currentDevice].orientation;
- if (orientation == UIInterfaceOrientationLandscapeLeft || orientation == UIInterfaceOrientationLandscapeRight)
- {
- NSLog(@"Landscape");
- }
- else
- {
- NSLog(@"Portrait");
- }
Add Comment
Please, Sign In to add comment