I am a beginner using Kobold2d v2.0.4, My games that I am creating is target for only iOS 6 and was design to run on Landscape orientation only, and when I implemented game center I found that game center login on iOS 6 only run on portrait, so I search and found the solution but the problem is I couldn't find where to put them in Kobold2d. Add this to your RootViewController
-(NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskAllButUpsideDown;
}
-(BOOL)shouldAutorotate {
return [[UIDevice currentDevice] orientation] != UIInterfaceOrientationPortrait;
}
I had try look for KKRootViewController but I could find, I just wondering how the other Kobold2d developer find the solution to solve this problem. If you wouldn't mind could you please advise me on how you resolve it. Thank you kindly.
I haven't tested it myself, I think it might work if you put this code in your project's AppDelegate class. If not, you may have to create a category with these methods, either on KKRootViewController or CCDirector.