shouldAutoRotateをfalseに設定しても、ビュー(InfoVC)が回転しています。これは、ビューを開いているコードです(モーダル内)
- (IBAction)presentInfoVC:(id)sender{
InfoVC *infoVC = [[InfoVC alloc] init];
UINavigationController *infoNVC = [[UINavigationController alloc] initWithRootViewController:infoVC];
UIImage *img =[UIImage imageNamed:@"image.png"];
UIImageView *imgView = [[UIImageView alloc] initWithImage:img];
infoNVC.navigationBar.tintColor = [UIColor lightGrayColor];
[infoNVC.navigationBar.topItem setTitleView:imgView];
[imgView release];
[self presentModalViewController:infoNVC animated:YES];
[infoVC release];
}
そして、このビューが回転するのを回避するはずだったコード(InfoVC.m内):
- (BOOL)shouldAutorotate
{
return FALSE;
}
なにが問題ですか?
よろしく!