How to manage orientation in iPad app

Posted by Annie on Stack Overflow See other posts from Stack Overflow or by Annie
Published on 2012-04-12T11:05:28Z Indexed on 2012/04/12 11:29 UTC
Read the original article Hit count: 208

Filed under:
|

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.

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about iPad