Quote:
Originally Posted by intomo
Code:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
if([(UINavigationController *)self.selectedViewController isKindOfClass:[UINavigationController class]])
if([[(UINavigationController *)self.selectedViewController visibleViewController] isKindOfClass:[MediaDetailViewController class]])
return (interfaceOrientation == UIInterfaceOrientationPortrait ||interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight);
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
I still get one error saying that MediaDetailViewController is a forward class and may not respond to @interface...
Am I still doing something wrong?
Thanks for the thread.
|
Use self.selectedIndex works for me. I only allow rotating view at index 3 in my app.
Thanks,