Forum Xamarin.iOS

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Finished event on GKLeaderboardViewController not raised

Authentication and Leaderboard opening works, but if I click on the "Done" button the finished event is not raising and there is no way to close the leaderboard. The documentation also seams to be out of sync, as it says the event is named "DidFinish" which doesn't exist anymore in monotouch version 6.0.6. http://iosapi.xamarin.com/?link=E:MonoTouch.GameKit.GKLeaderboardViewController.DidFinish

public static void ShowLeaderboard()
{
if (_authenticated)
{
if (_leaderboardController == null )
{
_leaderboardController = new GKLeaderboardViewController();
}

    if (_leaderboardController != null)         
    {
        _leaderboardController.Finished += delegate(object sender, EventArgs e) 
        {
            _leaderboardController.DismissViewController(true, null);
        };
        _parent.PresentViewController(_leaderboardController, true, null);
    }
}
else
{
    UIAlertView alert = new UIAlertView("Error","You need to be logged into Game Center",null,"Ok");
    alert.Show();
    //ShowSignIn(1,true);
}

}

Thanks!

Posts

Sign In or Register to comment.