2011-10-31 28 views

回答

0

你可以做這樣的事情。

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{ 
    if (_isPlaying) return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); 
    return (interfaceOrientation == UIInterfaceOrientationPortrait); 
} 

-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{ 
    [super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration]; 
    if (_isPlaying && UIInterfaceOrientationIsLandscape(toInterfaceOrientation)){ 
     // Hide tabBar Or Go fullscreen 
    } 
    else { 
     // show tabBar 
    } 
} 
+0

感謝您的快速回復@NJones。我的rootController是我的TabBarViewController,方向由應用程序委託處理。我的第一個標籤或應用程序中的視圖有幾個按鈕時按下將啓動MPMoviePlayerController。我有點困惑如何處理moviePlayerController的方向和/或通過應用程序委託使用UIWebView。 – tg2007