In ios6, I use the following code to authenticate on game center:
[GKLocalPlayer localPlayer].authenticateHandler = ^(UIViewController* viewController, NSError* error)
{
if (error != nil)
{
return;
}
else
{
if (viewController != nil)
{
[rootViewController presentModalViewController:viewController animated:YES];
}
}
The code above is bind to a button. Things works fine if the users correctly entered their username and password. However, if the user canceled the viewController and then tab the button again, the code block is never entered again. I want to show the login viewController after each time the user tabs the button (or at least for the first two or three times). How could I update my code?
Thanks for your reply