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


C# UIPopoverController.SetPopoverContentSize方法代码示例

本文整理汇总了C#中UIPopoverController.SetPopoverContentSize方法的典型用法代码示例。如果您正苦于以下问题:C# UIPopoverController.SetPopoverContentSize方法的具体用法?C# UIPopoverController.SetPopoverContentSize怎么用?C# UIPopoverController.SetPopoverContentSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UIPopoverController的用法示例。


在下文中一共展示了UIPopoverController.SetPopoverContentSize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ViewDidLoad

        // moveToVerifyViewSegue
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();
            // Perform any additional setup after loading the view, typically from a nib.

            btnAdd.Enabled = false;

            PopMenuView = new PopMenuViewController ();
            PopMenuView.FeatureSelected += (sender, e) => {
                Debug.WriteLine (e.SelectedFeatureName);

                if ("Edit" == e.SelectedFeatureName) {
                    btnAdd.Enabled = true;
                }
                else if ("Edit" == e.SelectedFeatureName) {
                    btnAdd.Enabled = true;
                }
                else {
                    btnAdd.Enabled = false;
                }

            };

            btnMenu.Clicked += (sender, e) => {
                UIPopoverController pop = new UIPopoverController (PopMenuView);
                pop.SetPopoverContentSize (new CGSize (200, 150), true);
                pop.PresentFromBarButtonItem ( btnMenu, UIPopoverArrowDirection.Any, true);
            };

            btnAdd.Clicked += (sender, e) => {
                PerformSegue ("moveToFlow01ViewSegue", this);
            };

            var editingVotes = new VoteManager ().ReadEditVotesFromRemote ();
            AppDelegate.EditingVotes.AddRange (editingVotes);

            var source = new TableSource (AppDelegate.EditingVotes);

            editingVoteTable.Source = source;

            source.EditingVoteSelected += ( sender, e) => {

                AppDelegate.SelectedEditingVote = e.SelectedEditingVote;

                if (AppDelegate.SelectedEditingVote.Status == EditStatus.Request) {
                    PerformSegue ("moveToVerifyViewSegue", this);
                }
            };
        }
开发者ID:FangHuaiAn,项目名称:iVoting,代码行数:50,代码来源:MenuViewController.cs

示例2: DatePickerPopover

        public DatePickerPopover(UIView owner)
        {
            this.Owner = owner;
            this.datePicker = new UIDatePicker();
            this.datePicker.Frame = new RectangleF(0, 44, 320, 216);

            var popoverContent = new UIViewController(); //ViewController
            var popoverView = new UIView
            {
                BackgroundColor = UIColor.Black
            };   //view

            popoverView.AddSubview(this.DatePicker);

            popoverContent.View = popoverView;
            popoverController = new UIPopoverController(popoverContent);
            popoverController.Delegate=this;

            popoverController.SetPopoverContentSize(new SizeF(320, 264),  false);
        }
开发者ID:DnyaneshwarWadghanePM,项目名称:notes-for-nurses-redux,代码行数:20,代码来源:DatePickerPopover.cs

示例3: setButtons

        private void setButtons()
        {
            btnReports = new UIBarButtonItem ("Reports", UIBarButtonItemStyle.Plain, delegate (object sender, EventArgs e) {
                Console.WriteLine ("reports button clicked, width: " + View.Frame.Width + " height: " + View.Frame.Height);
                if (isBusy) {
                    Busy ();
                } else {
                    //start new splitView with report selector and report container
                    //split = new UISplitViewController ();
                    var pageController = new PagedViewController (split, finder, this);
                    //var pageController = new BohaPageViewController ();
                    var reportSelector = new ReportSelectorController (pageController, true);
                    var masterNavigationController = new UINavigationController (reportSelector);

                    //var src = new ReportsDataSource ();
                    //reportSelector.pageController = pageController;
                    //pageController.PagedViewDataSource = src;
                    var detailNavigationController = new UINavigationController (pageController);

                    split.WeakDelegate = pageController;
                    split.ViewControllers = new UIViewController[] {
                        masterNavigationController,
                        detailNavigationController
                    };

                }
            });
            btnPostNote = new UIBarButtonItem ("Post Note", UIBarButtonItemStyle.Plain, delegate (object sender, EventArgs e) {
                Console.WriteLine ("post note button clicked, width: " + View.Frame.Width + " height: " + View.Frame.Height);
                if (isBusy) {
                    Busy ();
                } else {
                    //set up popover with postNote
                    matter.id = searchResult.matterID;
                    var pn = new PostNote (matter, this);
                    pop = new UIPopoverController (pn);
                    pop.SetPopoverContentSize (new SizeF (400f, 700f), true);
                    if (View.Frame.Height > 900) {
                        pop.SetPopoverContentSize (new SizeF (400f, 950f), true);
                        pop.PresentFromRect (new RectangleF (0f, 30f, 400f, 950f), this.View, UIPopoverArrowDirection.Any, true);
                    } else {
                        pop.PresentFromRect (new RectangleF (0f, 10f, 400f, 700f), this.TableView, UIPopoverArrowDirection.Any, true);
                    }

                }
            });
            btnPostFee = new UIBarButtonItem ("Post Fee", UIBarButtonItemStyle.Plain, delegate (object sender, EventArgs e) {
                Console.WriteLine ("post fee button clicked, width: " + View.Frame.Width + " height: " + View.Frame.Height);
                if (isBusy) {
                    Busy ();
                } else {
                    //set up popover with postFee
                    matter.id = searchResult.matterID;
                    var pn = new PostFee (this, this, matter, false);
                    pop = new UIPopoverController (pn);
                    pop.SetPopoverContentSize (new SizeF (500f, 900f), true);
                    if (View.Frame.Height > 900) {
                        pop.PresentFromRect (new RectangleF (0f, 40f, 500f, 900f), this.View, UIPopoverArrowDirection.Any, true);
                    } else {
                        pop.PresentFromRect (new RectangleF (0f, 20f, 500f, 700f), this.TableView, UIPopoverArrowDirection.Any, true);
                    }
                }
            });
            btnPostUnbillable = new UIBarButtonItem ("Post Unbillable", UIBarButtonItemStyle.Plain, delegate (object sender, EventArgs e) {
                Console.WriteLine ("post unbilled button clicked, width: " + View.Frame.Width + " height: " + View.Frame.Height);
                if (isBusy) {
                    Busy ();
                } else {
                    //set up popover with postFee
                    matter.id = searchResult.matterID;
                    var pn = new PostFee (this, this, matter, true);
                    pop = new UIPopoverController (pn);
                    pop.SetPopoverContentSize (new SizeF (500f, 900f), true);
                    if (View.Frame.Height > 900) {
                        pop.PresentFromRect (new RectangleF (0f, 40f, 500f, 900f), this.View, UIPopoverArrowDirection.Any, true);
                    } else {
                        pop.PresentFromRect (new RectangleF (0f, 20f, 500f, 700f), this.TableView, UIPopoverArrowDirection.Any, true);
                    }

                }
            });
            btnAbout = new UIBarButtonItem ("About", UIBarButtonItemStyle.Plain, delegate (object sender, EventArgs e) {
                var s = "\n";
                s += "UserName: " + NSUserDefaults.StandardUserDefaults.StringForKey ("userName") + "\n";
                s += "UserID: " + NSUserDefaults.StandardUserDefaults.StringForKey ("userID") + "\n";
                if (NSUserDefaults.StandardUserDefaults.StringForKey ("companyName") != null) {
                    s += "Practice: " + NSUserDefaults.StandardUserDefaults.StringForKey ("companyName") + "\n";
                }
                s += "App Version: " + NSBundle.MainBundle.InfoDictionary ["CFBundleVersion"] + "\n";
                new UIAlertView ("User Information", s, null, "OK").Show ();
            });
            btnTask = new UIBarButtonItem ("Tasks", UIBarButtonItemStyle.Plain, delegate (object sender, EventArgs e) {
                Console.WriteLine ("post task button clicked, width: " + View.Frame.Width + " height: " + View.Frame.Height);
                if (isBusy) {
                    Busy ();
                } else {
                    //set up popover with postTask
                    matter.id = searchResult.matterID;
                    var pn = new TaskDialog (searchResult, this);
                    pop = new UIPopoverController (pn);
//.........这里部分代码省略.........
开发者ID:rajeshwarn,项目名称:GhostPractice-iPadRepo,代码行数:101,代码来源:MatterDetail.cs


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