一个视图控制器的肖像,其他景观
答
我想你想要的是:shouldAutoRotateToInterfaceOrientation方法UIViewController
类。如果UIView
支持方向,则此函数返回YES
。如果您只有return YES
到landscape orientation
,那么iPhone将自动进入该方向。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationLandscape);
}
好运!
您总是欢迎您! – Bhavin