Forums › Programming › cocos2d support (graphics engine) › disabling temporarily autorotation
This topic contains 3 replies, has 2 voices, and was last updated by MandarX 2 years, 1 month ago.
Is there a way to tell CCDirector to disable temporarily autorotation?
I tried to comment some lines in shouldAutorotateToInterfaceOrientation and willRotateToInterfaceOrientation functions
and I disabled it but Box2D doesn’t work anymore!
v1.x or v2.0 ?
If v1.x, what kind of rotation did you enable in your GameConfig.h file ?
I’m using v0.99.5
in GameConfig.h GAME_AUTOROTATION is kGameAutorotationUIViewController
should I set it to kGameAutorotationCCDirector ?
found a solution
[[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications];
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
hope it helps
You must be logged in to reply to this topic.
Social Widgets powered by AB-WebLog.com.