How to manage orientation in iPad app
- by Annie
I have added a image on navigationcontroller in appdelagte class.
and set yes in
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
loginViewController = [[LoginViewController alloc]initWithNibName:@"LoginViewController" bundle:nil];
[self.window addSubview:_navController.view];
_navController.navigationBarHidden = NO;
navimage = [[UIImageView alloc] init];
navimage.frame = CGRectMake(300, 18, 177, 47);
navimage.image = [UIImage imageNamed: @"logo.png"];
[_navController.view addSubview:navimage];
[self.window makeKeyAndVisible];
return YES;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation{
return YES;
}
But navigation image position is not changing. The frame remains same in both modes.
Please give me idea how it will be solved in the case of navigation controller image.