我有一個視圖控制器,其中包含一個圖形視圖和分段控制。如何使視圖旋轉到水平?另外,是否可以加載另一個水平方向的視圖?旋轉時如何在自定義的iPhone應用程序中從垂直向水平視圖旋轉
- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
// Just delete the lines for the orientations you don't want to support
if((toInterfaceOrientation == UIInterfaceOrientationPortrait) ||
(toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown)) ||
(toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft)) ||
(toInterfaceOrientation == UIInterfaceOrientationLandscapeRight)) {
return YES;
}
return NO;
}
然後加載新的視圖控制器:
Thx提前, 姆拉登