Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7413417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:41:29+00:00 2026-05-29T06:41:29+00:00

I am using cocos2d engine in landscape-only orientation with no autorotation. I want to

  • 0

I am using cocos2d engine in landscape-only orientation with no autorotation.

I want to display standart GC achievements modal view.
It’s showing up normally, from bottom of screen (while holding device in landscape), but it is dismissing to the right side of the screen (like portrait modal views). It’s seems to be changing orientation for dismiss animation, but view is not rotating before this. It’s just sliding to the right.

Also I get a warning in console:

Unbalanced calls to begin/end appearance transitions for <UIViewController: 0x41b9a0>.

That’s how I showing this controller:

-(void)showAchievements:(id) sender {

    utilityController = [[UIViewController alloc] initWithNibName:nil bundle:nil];
    [[[CCDirector sharedDirector] openGLView] addSubview:utilityController.view]; 

    GKAchievementViewController *achievements = [[GKAchievementViewController alloc] init];
    if (achievements != nil)
    {
        achievements.achievementDelegate = self;
        [utilityController presentModalViewController: achievements animated: YES];
    }
    [achievements release];
}

- (void)achievementViewControllerDidFinish:(GKAchievementViewController *)viewController
{
    [utilityController dismissModalViewControllerAnimated:YES];
    [utilityController release];
}

In gameConfig.h I have following configuration:

#define GAME_AUTOROTATION kGameAutorotationNone

Tried to change this to kGameAutorotationCCDirector – same thing. kGameAutorotationUIViewController – uiviews are jumping all over the screen.

Please do not suggest rotating UIView with CGAffineTransformMakeRotation – it’s just a hack…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:41:30+00:00Added an answer on May 29, 2026 at 6:41 am

    For Kobold2D I solved this for all orientations with a category for the GKMatchmakerViewController. You can make the same category for the other Game Center view controllers.

    This will force the GC views to use the current device orientation:

    @implementation GKMatchmakerViewController (OrientationFix)
    -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
    {
        // [RootViewController option removed for clarity]
    
        // all other autorotation types use the current device orientation
        ccDeviceOrientation orientation = [CCDirector sharedDirector].deviceOrientation;
        switch (interfaceOrientation)
        {
            case UIInterfaceOrientationPortrait:
                return (orientation == kCCDeviceOrientationPortrait);
                break;
            case UIInterfaceOrientationPortraitUpsideDown:
                return (orientation == kCCDeviceOrientationPortraitUpsideDown);
                break;
            case UIInterfaceOrientationLandscapeLeft:
                return (orientation == kCCDeviceOrientationLandscapeRight);
                break;
            case UIInterfaceOrientationLandscapeRight:
                return (orientation == kCCDeviceOrientationLandscapeLeft);
                break;
            default:
                break;
        }
    
        return NO;
    }
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Cocos2D for my main framework. In some cases, I want Cocos2D
I am trying to build a game for the iphone using cocos2d engine. I
I'm using cocos2d and I want to see if a specific string is in
I just finish my iPhone game using cocos2d, and I want to submit it
i'm using cocos2d game engine for python. And i read api document but i
I'm using cocos2d and i want to play a movie. For these purposes i've
I am making a little game using cocos2d. Now i want to remove value
Background: I'm developing a game for the iPhone/iPad using cocos2d-iphone. Our engine provides the
I am using Cocos2d engine and I've faced a strange problem. I have a
I'm making a iPhone App written in Objective-C using the Cocos2d game engine. I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.