i have a application that supports only a portrait mode. but need to change orientation to landscape for a single view controller. i saw more answers here for this.
but i cant implement that. i created new single view application now. a view controller has a button. i want to change Orientation of view controller when i click the button.
#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
what code should be there in changeOrentaion method..?