本文整理汇总了C#中UINavigationController.PopViewControllerAnimated方法的典型用法代码示例。如果您正苦于以下问题:C# UINavigationController.PopViewControllerAnimated方法的具体用法?C# UINavigationController.PopViewControllerAnimated怎么用?C# UINavigationController.PopViewControllerAnimated使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UINavigationController
的用法示例。
在下文中一共展示了UINavigationController.PopViewControllerAnimated方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TankMix_CalculationCreateFill_2
public TankMix_CalculationCreateFill_2(Fill fill, UINavigationController naiv)
: base(UITableViewStyle.Grouped, null)
{
this.Pushing = true;
Root = new RootElement ("TankMix_CalculationCreateFill_2");
var section = new Section (){
new StringElement("back ",()=>{
naiv.PopViewControllerAnimated(true);
}),
};
}
示例2: ShowAddContactController
public void ShowAddContactController(UINavigationController navigationController, User user)
{
ABNewPersonViewController abController = new ABNewPersonViewController ();
ABPerson person = new ABPerson ();
KeyValuePair <string, string> namePair = GetFirstAndLastName (user);
person.FirstName = namePair.Key;
person.LastName = namePair.Value;
if (!string.IsNullOrEmpty (user.Company))
{
person.Organization = user.Company;
}
if (!string.IsNullOrEmpty (user.Phone))
{
ABMutableMultiValue<string> phones = new ABMutableStringMultiValue();
phones.Add(user.Phone, ABPersonPhoneLabel.Main);
person.SetPhones(phones);
}
if (!string.IsNullOrEmpty (user.Email))
{
ABMutableMultiValue<string> emails = new ABMutableStringMultiValue();
emails.Add(user.Email, null);
person.SetEmails(emails);
}
// Get any image from cache
byte [] data = Engine.Instance.ImageCache.FindAny (user);
if (data != null && data.Length > 0)
{
person.Image = NSData.FromArray(data);
}
abController.DisplayedPerson = person;
abController.NewPersonComplete += delegate {
navigationController.PopViewControllerAnimated (true);
};
navigationController.PushViewController (abController, true);
if (OnAddContactCompleted != null)
OnAddContactCompleted ();
}
示例3: FinishedLaunching
// This method is invoked when the application has loaded its UI and its ready to run
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
window = new UIWindow (UIScreen.MainScreen.Bounds);
window.BackgroundColor = UIColor.White;
table = new UITableViewController();
NavController = new UINavigationController();
// Add the [+] button
statusButton = new UIBarButtonItem (UIBarButtonSystemItem.Add);
statusButton.Clicked += delegate
{
usvc = new UpdateStatusViewController();
NavController.PushViewController(usvc, true);
};
table.NavigationItem.SetRightBarButtonItem (statusButton, false);
FacebookAuthorizationViewController fac =
new FacebookAuthorizationViewController(
clientId
, new string[] {"read_stream", "publish_stream"} //, "user_groups"}
, FbDisplayType.Touch);
fac.AccessToken +=
delegate(string accessToken, DateTime expires)
{
token = accessToken;
//Logged in, got your accessToken here and when it expires!
NavController.PopViewControllerAnimated(true);
//Do something else here (eg: Save the accessToken and expiry date to be used in your Graph API calls)
Console.WriteLine("### Get json");
System.Net.WebClient wc = new System.Net.WebClient();
var b = wc.DownloadData(
new Uri("https://graph.facebook.com/me/home?access_token=" + token)
);
var s = Encoding.UTF8.GetString(b);
//Console.WriteLine("### Output json");
Console.WriteLine(s);
// http://www.brettnagy.com/post/2009/11/21/Using-JsonNET-with-MonoTouch.aspx
var posts = JsonConvert.DeserializeObject<Posts>( s );
// foreach(var p in posts.data)
// {
// Console.WriteLine("name: " + p.from.name);
// }
table.Title = "Facebook";
table.TableView.Source = new TableViewSource(posts);
};
NavController.PushViewController(table, false);
NavController.PushViewController(fac, true);
NavController.NavigationBar.TintColor = new UIColor(0.27f,0.52f,0.73f,1f);
window.AddSubview(NavController.View);
window.MakeKeyAndVisible ();
return true;
}