public override void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path) { // Lazy load it if (leaderboardController == null) { leaderboardController = new GKLeaderboardViewController(); } if (leaderboardController != null) { leaderboardController.DidFinish += delegate(object sender, EventArgs e) { leaderboardController.DismissModalViewControllerAnimated(true); }; dvc.PresentModalViewController(leaderboardController, true); } }
public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath path) { // Lazy load it if ( leaderboardController == null ) { leaderboardController = new GKLeaderboardViewController(); } if (leaderboardController != null) { leaderboardController.DidFinish += delegate(object sender, EventArgs e) { leaderboardController.DismissModalViewControllerAnimated(true); }; dvc.PresentModalViewController(leaderboardController, true); } }
public static void OpenUrl(DialogViewController parent, string url, bool enableTitle) { UIView.BeginAnimations("OpenUrl"); Main.HidesBottomBarWhenPushed = true; Main.SetupWeb(url, enableTitle); if (url.StartsWith("http://")) { string host; int last = url.IndexOf ('/', 7); if (last == -1) { host = url.Substring (7); } else { host = url.Substring (7, last - 7); } url = "http://" + host + (last == -1 ? "" : url.Substring (last)); } Main.WebView.LoadRequest(new NSUrlRequest(new NSUrl(url))); parent.PresentModalViewController(Main, true); UIView.CommitAnimations(); }
public void AuthorizeUser(DialogViewController parent, NSAction callback) { var authweb = new AuthorizationViewController (this, config.AuthorizeUrl + "?oauth_token=" + RequestToken, callback); parent.PresentModalViewController (authweb, true); }
public static void OpenUrl (DialogViewController parent, string url) { UIView.BeginAnimations ("foo"); Main.HidesBottomBarWhenPushed = true; Main.SetupWeb (url); Main.SetParent(parent); if (url.StartsWith ("http://")){ string host; int last = url.IndexOf ('/', 7); if (last == -1) host = url.Substring (7); else host = url.Substring (7, last-7); url = "http://" + EncodeIdna (host) + (last == -1 ? "" : url.Substring (last)); } if (url.StartsWith ("https://")){ string host; int last = url.IndexOf ('/', 8); if (last == -1) host = url.Substring (8); else host = url.Substring (8, last-8); url = "https://" + EncodeIdna (host) + (last == -1 ? "" : url.Substring (last)); } //var nsurl = new NSUrl (url); var nsurl = NSUrl.FromString(url); Main.WebView.LoadRequest (new NSUrlRequest (nsurl)); parent.PresentModalViewController (Main, true); UIView.CommitAnimations (); }
public void AuthorizeUser(DialogViewController parent, NSAction callback) { //NSString * OAuthURLString = [kGowallaOAuthURL stringByAppendingFormat:@"?redirect_uri=%@&client_id=%@&scope=%@", kGowallaRedirectURI, kGowallaAPIKey, @"read-write"]; var authweb = new GowallaAuthorizationViewController (this, config.OAuthUrl + "?redirect_uri=" + config.Callback + "&client_id=" + config.APIKey + "&scope=read-write", callback); parent.PresentModalViewController (authweb, true); }