public static void OpenUrl(DialogViewController parent, string url) { UIView.BeginAnimations("foo"); Main.HidesBottomBarWhenPushed = true; Main.SetupWeb(url); 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)); } Main.WebView.LoadRequest(new NSUrlRequest(new NSUrl(url))); 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); }
public RootElement CreateRoot() { return(new RootElement("Tapku Library") { new Section("Views") { new StringElement("Coverflow", () => { dvc.PresentModalViewController(new CoverflowViewController(), true); // dvc.ActivateController(new CoverflowViewController()); }), new StringElement("Month Grid Calendar", () => { dvc.ActivateController(new DemoCalendarMonth()); }), }, new Section("UI Elements") { new StringElement("Empty Sign", () => { dvc.ActivateController(new EmptyViewController()); }), new StringElement("Loading HUD", () => { dvc.ActivateController(new HUDViewController()); }), new StringElement("Alerts", () => { dvc.ActivateController(new AlertsViewController()); }), new StringElement("Place Pins", () => { dvc.ActivateController(new MapViewController()); }), }, new Section("Network") { new StringElement("Image Cache", () => { dvc.ActivateController(new ImageCenterViewController()); }), }, }); }
public void AuthorizeUser(DialogViewController parent, NSAction callback) { var authweb = new AuthorizationViewController(this, config.AuthorizeUrl + "?oauth_token=" + RequestToken, callback); parent.PresentModalViewController(authweb, true); }