我正在使用fowllowing代码旋转到横向,但导航栏不旋转。我在我的应用程序中使用Three20导航
问题描述:
- (void)viewWillAppear:(BOOL)animated; {
// First rotate the screen:
[UIApplication sharedApplication].statusBarOrientation = UIInterfaceOrientationLandscapeLeft;
// Then rotate the view and re-align it:
CGAffineTransform landscapeTransform = CGAffineTransformMakeRotation((270.0/180*M_PI));
landscapeTransform = CGAffineTransformTranslate(landscapeTransform, +90.0, +90.0);
[self.view setTransform:landscapeTransform];
}
答
没有使用Three20,但是您的类是否在shouldAutorotateToInterfaceOrientation中返回YES或类似内容?
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { \t \t 回报(interfaceOrientation == UIInterfaceOrientationLandscapeRight); } – Imran 2011-03-08 08:28:03
其唯一的导航栏不旋转整个视图完美旋转。 – Imran 2011-03-08 08:34:12