Q:

Cannot Close Game Center Leaderboards Page

I can load up leaderboards with no problem.  But I can't get it to close when the "Done" button is clicked. 
How I'm opening it:
- (IBAction)leaderboardsClicked:(id)sender{
    if ([GKLocalPlayer localPlayer].isAuthenticated) {
        GKGameCenterViewController *leaderboardController = [[GKGameCenterViewController alloc] init];
        [self presentViewController:leaderboardController animated:YES completion:NULL];
    }else{
        UIAlertView *alert = [[UIAlertView alloc]initWithTitle: @"Error"
            message: @"You must be logged into Game Center to view the leaderboards.  Open Game Center?" 
            delegate: self
            cancelButtonTitle:@"No"
            otherButtonTitles:@"Yes",nil];
        [alert show];
    }
}

How I'm closing it:
- (void)gameCenterViewControllerDidFinish:(GKGameCenterViewController *)gameCenterViewController{
    NSLog(@"test");
    [self dismissViewControllerAnimated:YES completion:nil];
}

EDIT:
The method isn't running at all; so "test" doesn't even get printed. 
And I added <GKGameCenterControllerDelegate> to my ViewController's protocol.  

A:

Try this instead:
- (IBAction)leaderboardsClicked:(id)sender{
    if ([GKLocalPlayer localPlayer].isAuthenticated) {
        GKGameCenterViewController *leaderboardController = [[GKGameCenterViewController alloc] init];
        leaderboardController.gameCenterDelegate = self;
        gameCenterController.viewState = GKGameCenterViewControllerStateLeaderboards;

        [self presentViewController:leaderboardController animated:YES completion:NULL];
    }else{
        UIAlertView *alert = [[UIAlertView alloc]initWithTitle: @"Error"
            message: @"You must be logged into Game Center to view the leaderboards.  Open Game Center?" 
            delegate: self
            cancelButtonTitle:@"No"
            otherButtonTitles:@"Yes",nil];
        [alert show];
    }
}

And:
- (void) gameCenterViewControllerDidFinish:(GKGameCenterViewController*) gameCenterViewController {
    [self dismissViewControllerAnimated:YES completion:nil];
}

