0
在我的應用程序中,我需要在縱向視圖或oriantation之後的橫向oriantation,就像當我們轉到媒體播放器默認oriantation橫向時一樣。iphone如何改變oriantation像電影播放器或媒體播放器
在我的應用程序中,我需要在縱向視圖或oriantation之後的橫向oriantation,就像當我們轉到媒體播放器默認oriantation橫向時一樣。iphone如何改變oriantation像電影播放器或媒體播放器
您必須覆蓋shouldAutorotate:
- (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscape);
}
這隻會迫使你的控制器的風景線。
覆蓋在包含視頻播放器的viewController
的
- (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation
方法