我正在研究僅支持橫向方向的iPad應用程序,我希望允許某些呈現的視圖控制器支持所有方向而不更改呈現視圖控制器的方向。我在Xcode設置中支持所有方向,除了倒置。旋轉呈現的視圖並鎖定呈現視圖控制器的方向
代碼我使用到現在視圖控制器
ViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"VC"];
vc.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentViewController:vc animated:YES completion:nil];
代碼我使用的允許呈現視圖控制器方向:
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskAll;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation{
return YES;
}
你管的應用提供同種功能的同時播放視頻,任何想法如何工作?
任何幫助將不勝感激,謝謝。
我不使用導航控制器還,如果我改變的方向是改變兩個視圖控制器的方向,我只想**呈現視圖控制器**方向更改不**呈現視圖控制器**(因爲我通過設置呈現視圖控制器樣式**表單**所以兩個視圖控制器都可見) – user2493047