0

For some reason I can't use any of the automatic functions for handling rotation on devices (like the shouldAutorotateToInterfaceOrientation). I always had to do it manually by using this:

SOMETHING.view.transform = CGAffineTransformMakeRotation( angle * M_PI );

I don't really mind that - I kind of even like rotating everything manually. This worked fine, except for Game Center.

I have no problem with rotating the match maker - the window in which you look for people to play with.

I'll mention this just in case, since I've seen similar questions asked here - but it is not the issue I am having:

GKMatchmakerViewController *mmvc = [[[GKMatchmakerViewController alloc] initWithMatchRequest:request] autorelease];    
    mmvc.matchmakerDelegate = self;

    [presentingViewController presentModalViewController:mmvc animated:YES];
    mmvc.view.transform = CGAffineTransformMakeRotation( angle * M_PI ); 

This rotates the match-maker of Game Center perfectly fine, however I have no idea how to do the same for the actual "sign in" screen that precedes the matchmaker. There are no view controllers created by me, everything seems to be done automatically when calling the "Authenticate" function. And since its done automatically, I have no idea how to control the resulting view.

- (void)authenticateLocalUser { 

if (!gameCenterAvailable) return;

NSLog(@"Authenticating local user...");
if ([GKLocalPlayer localPlayer].authenticated == NO) {     

     [[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:^(NSError *error) {

     if ([GKLocalPlayer localPlayer].isAuthenticated)

     {

         // Perform additional tasks for the authenticated player.
          [[GCHelper sharedInstance] findMatchWithMinPlayers:2 maxPlayers:2 viewController:nil];

     }

     }];  
} else {
    NSLog(@"Already authenticated!");
}

}

At this point, I already get a "sign in" screen and I have no idea how to control it.

How do I change the orientation of that (and the following one where you enter your Apple ID and password) screen programmatically, without using any of the automatic functions?

Rob Hruska
  • 118,520
  • 32
  • 167
  • 192

1 Answers1

0

The latest version of SDL 2.0 has much improved orientation support. I'm using it with a Game Center app here that can show and rotate into any orientation and it works fine.

http://www.libsdl.org/tmp/SDL-2.0.zip

Sam Lantinga
  • 141
  • 1
  • 5