在现在的ios sdk中,我们一般通过UIApplication的setStatusBarOrientation:来进行View的强制旋转(当然,还要配合- (BOOL)shouldAutorotateToInterf
.........{
//
为了马上旋转过来
UINavigationController
*
nav
=
[[GurgleAppDelegate getAppDelegate] navigationController];
UIViewController
*
controller
=
[[UIViewController alloc] init];
UINavigationController
*
parentController
=
[[UINavigationController alloc] initWithRootViewControll er:controller];
[nav presentModalViewControll er:parentController animated:NO];
[controller dismissModalViewControll erAnimated:NO];
[parentController release];
[controller release];
}
//
Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterf aceOrientation:(UIInterfaceOrientation)interfaceOrientation {
//
Return YES for supported orientations.
return
viewOrientation
==
interfaceOrientation;
}
-
复制代码
}