2012-12-22 65 views

回答

2

我想你想要的是:shouldAutoRotateToInterfaceOrientation方法UIViewController類。如果UIView支持方向,則此函數返回YES。如果您只有return YESlandscape orientation,那麼iPhone將自動進入該方向。

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 
    // Return YES for supported orientations 
    return (interfaceOrientation == UIInterfaceOrientationLandscape); 
} 

好運!

+0

您總是歡迎您! – Bhavin

相關問題