當前位置: 首頁>>代碼示例>>C#>>正文


C# DialogViewController.PresentModalViewController方法代碼示例

本文整理匯總了C#中MonoTouch.Dialog.DialogViewController.PresentModalViewController方法的典型用法代碼示例。如果您正苦於以下問題:C# DialogViewController.PresentModalViewController方法的具體用法?C# DialogViewController.PresentModalViewController怎麽用?C# DialogViewController.PresentModalViewController使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在MonoTouch.Dialog.DialogViewController的用法示例。


在下文中一共展示了DialogViewController.PresentModalViewController方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Selected

		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);
		    }
		}
開發者ID:CartBlanche,項目名稱:MonoTouch.Dialog,代碼行數:17,代碼來源:GameKitLeaderboardElement.cs

示例2: OpenUrl

		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();
		}
開發者ID:modulexcite,項目名稱:artapp,代碼行數:23,代碼來源:WebViewController.cs

示例3: AuthorizeUser

        public void AuthorizeUser(DialogViewController parent, NSAction callback)
        {
            var authweb = new AuthorizationViewController (this, config.AuthorizeUrl + "?oauth_token=" + RequestToken, callback);

            parent.PresentModalViewController (authweb, true);
        }
開發者ID:conceptdev,項目名稱:TweetStation,代碼行數:6,代碼來源:OAuthAuthorizer.cs

示例4: OpenUrl

		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 ();
		}
開發者ID:21Off,項目名稱:21Off,代碼行數:34,代碼來源:Web.cs

示例5: AuthorizeUser

        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);
        }
開發者ID:martinbowling,項目名稱:GowallaOAuthSample,代碼行數:7,代碼來源:GowallaOAuthorizer.cs


注:本文中的MonoTouch.Dialog.DialogViewController.PresentModalViewController方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。