Is there any way to provide Autorotation to a SingleViewController
as in our iPhone App have multiple ViewControllers and need to do autorotate for only One.
1 に答える
2
はい、VC に使用できます (ローテーションではありません)。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
//return (interfaceOrientation == UIInterfaceOrientationPortrait);
return NO;
}
// New Autorotation support for iOS 6.
- (BOOL)shouldAutorotate NS_AVAILABLE_IOS(6_0);
{
Return NO;
}
Apple Docも参照してください 。
于 2012-11-22T06:44:30.300 に答える