コード例 #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);
            });
        }
コード例 #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);
            });
        }
コード例 #3
0
ファイル: StartViewController.cs プロジェクト: moostep/Reqqr
        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);
        }