Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AppDelegate *appDelegate = (AppDelegate *) [UIApplication sharedApplication].delegate;
- appDelegate.restrictRotation = TRUE;
- MapViewController * sliderVC = [[MapViewController alloc] init ];
- sliderVC.modalPresentationStyle = UIModalPresentationCurrentContext;
- [self presentViewController:sliderVC animated:NO completion:nil];
- sliderVC.view.backgroundColor = [UIColor clearColor];
- - (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
- {
- if(self.restrictRotation)//set the bool value to view controller which you want to load in landscape
- return UIInterfaceOrientationMaskLandscapeRight;
- else
- return UIInterfaceOrientationMaskPortrait;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement