2012-01-02 54 views
0

我的遊戲應用程序是LandScape &使用UIViewController的AutoRotation。如何在cocos2d中暫停AutoRotation(使用UIViewController的AutoRotation)?

而登錄視圖(場景)是UIView,而不是場景。

我想要「肖像模式」登錄視圖。並做了工作。

當我使用的UITextField ...自動旋轉使一些問題

只有鍵盤是風景模式...

所以我需要在登錄視圖非自轉。 (登錄後需要自動生成)

如何暫停AutoRotation?

回答

0

你可能要實現 「shouldAutorotateToInterfaceOrientation」,並鎖定方位potrait

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 

    return interfaceOrientation == UIInterfaceOrientationPortrait; 
}