本文整理汇总了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);
}
}
示例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();
}
示例3: AuthorizeUser
public void AuthorizeUser(DialogViewController parent, NSAction callback)
{
var authweb = new AuthorizationViewController (this, config.AuthorizeUrl + "?oauth_token=" + RequestToken, callback);
parent.PresentModalViewController (authweb, true);
}
示例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 ();
}
示例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);
}