shouldAutorotateToInterfaceOrientation not working for detail view
Posted
by
TheLearner
on Stack Overflow
See other posts from Stack Overflow
or by TheLearner
Published on 2011-01-10T09:49:05Z
Indexed on
2011/01/10
9:53 UTC
Read the original article
Hit count: 177
iphone
|cocoa-touch
I am using Xcode's SplitView template as the base for my project and I only want to accept Landscape mode.
I have implemented the method in the RootViewController and DetailViewController:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
switch (interfaceOrientation)
{
case UIInterfaceOrientationLandscapeLeft:
return YES;
}
return NO;
}
However what happens is the app loads with in Landscape mode with the tableview on the left but the detail view is black / blank.
How do I get the detailview to load properly and do I need to implement this method is all view controllers or just the root one?
© Stack Overflow or respective owner