for i want to build a movie controller,and it`s pushed by a navigationController,how can i set it ,also only this vc can be landscape,others should only be portraitUp,please help,thanks in advance.
Asked
Active
Viewed 62 times
1 Answers
0
Try..
- (void)viewDidAppear:(BOOL)animated
{
NSNumber *value = [NSNumber numberWithInt:UIInterfaceOrientationLandscapeLeft];
[[UIDevice currentDevice] setValue:value forKey:@"orientation"];
}
- (void)viewDidDisappear:(BOOL)animated
{
NSNumber *value = [NSNumber numberWithInt:UIInterfaceOrientationPortrait];
[[UIDevice currentDevice] setValue:value forKey:@"orientation"];
}

Reming Hsu
- 2,215
- 15
- 18
-
thanks for your help,i have complete my code,for i rebuild a navigitionController; – Ting Liao Jun 12 '15 at 10:16