当前位置: 首页>>代码示例>>C#>>正文


C# UINavigationController.PopViewControllerAnimated方法代码示例

本文整理汇总了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);
                }),
            };
        }
开发者ID:WenF,项目名称:TankMix_App,代码行数:12,代码来源:TankMix_CalculationCreateFill_2.cs

示例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 ();
        }
开发者ID:bholmes,项目名称:XamarinEvolve2013Project,代码行数:49,代码来源:ContactHelper.cs

示例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;
        }
开发者ID:conceptdev,项目名称:Facebook,代码行数:67,代码来源:Main.cs


注:本文中的UINavigationController.PopViewControllerAnimated方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。