disabling temporarily autorotation

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.

Viewing 4 posts - 1 through 4 (of 4 total)
Author Posts
Author Posts
February 6, 2012 at 5:45 pm #239007

MandarX
Participant
@mandarx

Hello,

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!

MandarX

February 6, 2012 at 9:41 pm #364783

riq
Keymaster
@admin

v1.x or v2.0 ?

If v1.x, what kind of rotation did you enable in your GameConfig.h file ?

February 6, 2012 at 9:46 pm #364784

MandarX
Participant
@mandarx

I’m using v0.99.5

in GameConfig.h GAME_AUTOROTATION is kGameAutorotationUIViewController

should I set it to kGameAutorotationCCDirector ?

MandarX

March 20, 2012 at 6:29 pm #364785

MandarX
Participant
@mandarx

found a solution

[[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications];

and

[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];

hope it helps

MandarX

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.