1

Used the Ray Wenderlich tutorial "How to Intergrate UIKit and Cocos2D" mentioned here and it worked great unthil iOs6 was released, then, I get the "Orientation Problem on iOS 6"...

Help? How to apply the fix for the rotation problem? http://www.cocos2d-x.org/news/73

Note: My question is for a project that combines UiKit and Cocos2D like Ray's tutorial?

I have posted my code excerpt and structure here:

http://www.raywenderlich.com/forums/viewtopic.php?f=20&t=1081&p=34166#p34166

I am sorry that I am a beginner :(

Where should I apply the two parts of the fix?

In MainMenuViewController.m?

Or, do I need to download the lastest Cocos2D framework and redo a lot of development for theis almost completed app..?

Cheers,

Andrea

Andrea
  • 11
  • 1

1 Answers1

0

The way I solved it is by following the solution in the comments to this implementation (which is similar to the one in the RW tutorial):

Tinytimegames - cocos2d and storyboards

The specific code posted by "Pierre" there is:

And if you want your glView to resize:
CCGLView *glView = ...
glView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

This forces the glView to resize automatically when the device orientation changes.

user1459524
  • 3,613
  • 4
  • 19
  • 28