【发布时间】:2014-07-30 14:20:14
【问题描述】:
我有一个仅支持纵向模式的应用程序。但需要将单个视图控制器的方向更改为横向。我在这里看到了更多答案。
但我无法实现。我现在创建了新的单视图应用程序。视图控制器有一个按钮。我想在单击按钮时更改视图控制器的方向。
#import "pixViewController.h"
#import "pixNextViewController.h"
@interface pixViewController ()
- (IBAction)changeOrientation:(id)sender;
@end
@implementation pixViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (IBAction)changeOrientation:(id)sender {
}
@end
changeOrentaion 方法中应该有什么代码..?
【问题讨论】:
-
CGAffineTransform,也许?
标签: ios xcode uiviewcontroller uistatusbar orientation-changes