forçar UIViewController para estar no modo paisagem iOS7
Eu implementei as funções apropriadas, mas elas não são acionadas? Eu tentei várias soluções aqui no StackOverFlow, mas nenhuma delas funciona. Eu tentei adicionar a exibição a um UINavigationController, também não funciona.
FakeIDDetailViewController.h:
@interface FakeIDDetailViewController : UIViewController
@end
FakeIDDetailViewController.m:
@interface FakeIDDetailViewController ()
-(BOOL)shouldAutorotate
{
return NO;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (UIInterfaceOrientationMaskLandscapeLeft);
}
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscapeLeft;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationLandscapeLeft;
}
- (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
return UIInterfaceOrientationLandscapeLeft;
}