Reputation: 693
I know that I can return YES to support Landscape mode in shouldAutorotateToInterfaceOrientation. But I would like to display a new view, when the user turn the device into landscape mode, how can I do so? thank you.
Upvotes: 0
Views: 192
Reputation: 75058
A useful technique for just this case is, to present a new modal view controller with a "fade" transition from your current view. You can do this in reaction to UIDeviceOrientationDidChangeNotification
as mentioned previously by Aaron.
Upvotes: 0
Reputation: 79
[[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight];
Upvotes: -1
Reputation: 33345
Observer this event UIDeviceOrientationDidChangeNotification
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(orientationDidChange:)
name:UIDeviceOrientationDidChangeNotification object:nil];
Upvotes: 2