Ho wcan我給我的兩個視圖控制器在我的應用程序的方向支持?感染我有一個基於標籤欄的應用程序,並且ii在tabbar中添加了導航項目。我有一個自TabBarViewController並在該視圖控制器我允許定向如何給我的兩個viewcontrollers提供方向支持?
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
現在我不想在每個視圖控制器定向支持。我只需要在兩個或三個視圖控制器中使用它。當我在任何視圖控制器中編寫return (interfaceOrientation = UIInterfaceOrientationPortrait);
時,它不起作用,應用程序仍然在改變其方向。如果我停止從我的CustomTabBarViewController的方向,那麼它會停止整個應用程序的方向。
任何人都可以幫助我嗎? 我剛剛被困在這裏
在此先感謝
表示無解:( – Mashhadi