コード例 #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            TagFilterView tfv = new TagFilterView(15, 280, 7);

            tfv.UserInteractionEnabled = true;
            tfv.AddGestureRecognizer(new UITapGestureRecognizer(delegate() {
                TagTableViewController ttvc          = new TagTableViewController();
                UIPopoverController tagFilterPopover = new UIPopoverController(ttvc);
                tagFilterPopover.BackgroundColor     = UIColor.White;
                tagFilterPopover.SetPopoverContentSize(new CoreGraphics.CGSize(320, 320), true);
                AppDisplayUtil.Instance.SetPopoverController(tagFilterPopover);
                tagFilterPopover.PresentFromRect(new CoreGraphics.CGRect(0, 0, 30, 30), tfv, UIPopoverArrowDirection.Up, true);
            }));

            FilterNavigationBar.Add(tfv);
        }
コード例 #2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            UIBarButtonItem historyBarButtonItem = new UIBarButtonItem(new UIImage("Images/Navigation/HistoryIcon.png"), UIBarButtonItemStyle.Plain, ShowPopoverRecentHistory);
            UIBarButtonItem tagBarButtonItem     = null;

            tagBarButtonItem = new UIBarButtonItem(new UIImage("Images/Navigation/TagsIcon.png"), UIBarButtonItemStyle.Plain, delegate(object sender, EventArgs e) {
                UIStoryboard storyboard = UIStoryboard.FromName("PopoverTagManage", NSBundle.MainBundle);
                UserTagTableViewController userTagVC           = (UserTagTableViewController)storyboard.InstantiateViewController("NavigationController");
                UINavigationController navController           = new UINavigationController(userTagVC);
                navController.NavigationBar.BarTintColor       = UIColor.White;
                UIPopoverController tagManagePopoverController = new UIPopoverController(navController);
                tagManagePopoverController.BackgroundColor     = UIColor.White;
                tagManagePopoverController.SetPopoverContentSize(new CoreGraphics.CGSize(320, 320), true);
                AppDisplayUtil.Instance.SetPopoverController(tagManagePopoverController);

                UIView viewOfBarButtonItem = (UIView)((UIBarButtonItem)sender).ValueForKey(new NSString("view"));
                tagManagePopoverController.PresentFromRect(viewOfBarButtonItem.Frame, viewOfBarButtonItem.Superview, UIPopoverArrowDirection.Up, true);
            });

            NavigationItem.RightBarButtonItems = new UIBarButtonItem[] { TabBarController.NavigationItem.RightBarButtonItem, historyBarButtonItem, tagBarButtonItem };


            TagTableViewController tagTableVC = new TagTableViewController();

            tagTableVC.TableView                 = TagTableView;
            tagTableVC.TableView.Source          = new TagTableViewSource(TagTableView);
            tagTableVC.TableView.TableFooterView = new UIView();

            AnnotationTableViewController annotationTableVC = new AnnotationTableViewController();

            annotationTableVC.TableView                 = AnnotationTableView;
            annotationTableVC.TableView.Source          = new AnnotationTableViewSource(annotationTableVC.TableView);
            annotationTableVC.TableView.TableFooterView = new UIView();
        }