title: xcode "Done Button" GameCenter doesn´t do anything
body: <p>this is my first app including the gamecenter, and i have a little problem with it.
  i implemented some code i found in the net that should work. Everything works fine, except for "done button" :(</p>
  
  <p>.m</p>
  
  <pre><code> #import &lt;GameKit/GameKit.h&gt;
  
      - (void)viewDidLoad {
      [[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:^(NSError *error) {
              if (error == nil)
                  NSLog(@"Authentication Successful!");
              else
                  NSLog(@"Authentication Failed!");
          }];
  
  
  -(IBAction)subscore{
  
      GKScore *scoreReporter = [[GKScore alloc] initWithCategory:@"lrhseasy"];
      scoreReporter.value = score;
      [scoreReporter reportScoreWithCompletionHandler:^(NSError *error) {
          if (error != nil) {
              NSLog(@"Submitting a score failed!");
          }
          else {
              NSLog(@"Submitting succeeded!");
          }
      }];
  
  }
  -(IBAction)showLeader{
  
      GKLeaderboardViewController *leaderboardController = [[GKLeaderboardViewController alloc]init];
      if (leaderboardController != nil) {
          //leaderboardController.leaderboardDelegate = self;
          [self presentModalViewController:leaderboardController animated:YES];
      }
  
  }
  
  
      - (void)leaderboardViewControllerDidFinish:(GKLeaderboardViewController *)viewController {
          NSLog(@"Close leaderboard");
          [self dismissModalViewControllerAnimated:YES];
          [viewController.view.superview removeFromSuperview];
      }
  </code></pre>
  
  <p>The last function isn´t called, when the done button is pressed - i don´t get "close leaderboard" in the debug console.</p>
  
  <p>After searching for 3 hours, the only thing i found was
  "<strong>Did you add GKLeaderboardViewControllerDelegate to the list of protocols that this class implements?</strong> " but i do not know what this means or how its done :( </p>