Exemplo n.º 1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Action, delegate {
                ActionSheet.Begin("Actions")
                .AddCancel("Cancel")
                .AddOther("Edit request", EditRequest)
                .AddOther("Post request", PostRequest)
                .End()
                .ShowFrom(NavigationItem.RightBarButtonItem, true);
            });
        }
Exemplo n.º 2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Action, delegate {
                ActionSheet.Begin("Type")
                .AddCancel("Cancel")
                .AddOther("Show as JSON", ShowJson)
                .AddOther("Show as XML", ShowXml)
                .AddOther("Show response", ShowResponse)
                .End()
                .ShowFrom(NavigationItem.RightBarButtonItem, true);
            });
        }
Exemplo n.º 3
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            var actionSheet = ActionSheet
                              .Begin("Title")
                              .AddCancel("Cancel")
                              .AddOther("Action1", () => Console.WriteLine("Button 1 tapped"))
                              .AddOther("Action2", () => Console.WriteLine("Button 2 tapped"))
                              .End();

            var button = UIButton.FromType(UIButtonType.InfoDark);

            button.TouchUpInside += delegate {
                actionSheet.ShowInView(View);
            };

            NavigationItem.RightBarButtonItem = new UIBarButtonItem(button);
        }