当前位置: 首页>>代码示例>>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;未经允许,请勿转载。