Guest User

Untitled

a guest
Jan 19th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. if(SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"6.0"))
  2. {
  3. GKLocalPlayer *localPlayer = [GKLocalPlayer localPlayer];
  4. localPlayer.authenticateHandler = ^(UIViewController *viewController, NSError *error)
  5. {
  6. if (viewController != nil)
  7. {
  8. AppController *appDelegate = (AppController*)[UIApplication sharedApplication].delegate;
  9.  
  10. [delegate.viewController presentViewController:viewController animated:YES completion:nil];
  11. }
  12. else if (localPlayer.isAuthenticated)
  13. {
  14. NSLog(@"Player authenticated");
  15. }
  16. else
  17. {
  18. NSLog(@"Player authentication failed");
  19. }
  20. };
  21. }
  22.  
  23. - (NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window
  24. {
  25. return UIInterfaceOrientationMaskAllButUpsideDown;
  26. }
Add Comment
Please, Sign In to add comment