我有uitabbar應用程序,我想在橫向模式下旋轉一個ViewController和圖表。有可能做到這一點?在UITabBar應用程序中旋轉一個UIViewController
0
A
回答
2
有沒有簡單的方法來在橫向模式只有一個視圖,而別人都在景觀,也不是以編程方式切換到橫向模式的簡單方法。
一種可行的方法是使用一個CGAffineTransform
改變你的觀點在viewWillAppear
(顯示的視圖,即權前):
- (void)viewWillAppear:(BOOL)animated; {
//-- Adjust the status bar
[UIApplication sharedApplication].statusBarOrientation = UIInterfaceOrientationLandscapeRight;
//-- Rotate the view
CGAffineTransform toLandscape = CGAffineTransformMakeRotation(degreesToRadian(90));
toLandscape = CGAffineTransformTranslate(toLandscape, +90.0, +90.0);
[self.view setTransform:toLandscape];
}
希望這對你的作品。
0
只有當它的模式,如果它是tabBarController的一部分,你需要支持的方向更改所有控制器
相關問題
- 1. Single UIViewController UITabBar內部自動旋轉
- 2. 在iPhone應用程序中旋轉MKMapView
- 3. 在應用程序中有UITabBar和UINavigationController?
- 4. 在iOS上有一個按鈕調用UITabBar應用程序
- 5. UITabbar應用程序問題
- 6. UITabBar自動旋轉ios4 +
- 7. 在imageview旋轉的應用程序chrashing
- 8. iPad應用程序中的旋轉
- 9. 力旋轉的UIViewController
- 10. UIViewcontroller不會旋轉
- 11. UIViewController旋轉問題
- 12. UiViewController旋轉問題
- 13. 停止UITabBarController旋轉但UIViewController旋轉
- 14. iOS 6 - 在UINavigationController中強制旋轉UIViewController
- 15. 在TabbarController的NavigationController中強制UIViewController旋轉
- 16. 如何開發一個「旋轉瓶子」應用程序
- 17. IOS通用應用程序旋轉
- 18. 以編程方式旋轉UIViewController?
- 19. iOS。如何啓用或禁用旋轉一個UIViewController的
- 20. 旋轉瓶子應用程序
- 21. Iphone Tabbar應用程序不旋轉
- 22. CGAffineTransformMakeRotation和UIViewController旋轉困境
- 23. 移動應用程序只在Ipad上旋轉3個方向
- 24. 使用UITabBar應用程序刷新ViewController
- 25. iPhone的UITabBar作爲應用程序窗口的一部分;旋轉設備時出現問題
- 26. 當我打開一個對話框並且設備旋轉時,應用程序崩潰,我的應用程序中的Android對話框在旋轉
- 27. UIViewController presentModalViewController:像地圖應用程序中的水平轉換
- 28. 不同方向的UITabbar應用程序
- 29. UITabbar應用程序的方向問題
- 30. 只能自動旋轉UITabBar中的一些選項卡? (iOS 5)