void RightAddButton_TouchUpInside(object sender, EventArgs e) { UIStoryboard storyboard = UIStoryboard.FromName("PopoverTagManage", NSBundle.MainBundle); UserTagTableViewController userTagVC = (UserTagTableViewController)storyboard.InstantiateViewController("NavigationController"); userTagVC.typeString = "NoteTag"; UINavigationController navController = new UINavigationController(userTagVC); navController.NavigationBar.TintColor = UIColor.Red; userTagVC.Title = "Edit Tag"; highlightVC.NavigationController.PushViewController(userTagVC, true); }
partial void EditTagClick(NSObject sender) { UIStoryboard storyboard = UIStoryboard.FromName("PopoverTagManage", NSBundle.MainBundle); UserTagTableViewController userTagVC = (UserTagTableViewController)storyboard.InstantiateViewController("NavigationController"); userTagVC.typeString = "NoteTag"; UINavigationController navController = new UINavigationController(userTagVC); navController.NavigationBar.TintColor = UIColor.Red; userTagVC.Title = "Edit Tag"; this.NavigationController.PushViewController(userTagVC, true); }
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(); }