public override void ViewDidLoad() { base.ViewDidLoad(); NavigationItem.LeftBarButtonItem = new UIBarButtonItem(UIImage.FromBundle("Hamburger"), UIBarButtonItemStyle.Plain, (sender, e) => { if (DrawerViewController == null) { DrawerViewController = new DrawerViewController(); DrawerViewController.TransitioningDelegate = new ShowDrawerTransitionDelegate(DrawerDirection.Left, 270); DrawerViewController.ModalPresentationStyle = UIModalPresentationStyle.Custom; } PresentViewController(DrawerViewController, true, null); }); ApplicationExtensions.ActivatePage(typeof(MyCardsViewController), false, false); }
public override void ViewDidLoad() { PullToRefresh = false; base.ViewDidLoad(); TableSource = new DrawerTableViewSource(); TableSource.ItemSelected += (NSIndexPath arg1, DrawerShared.DrawerModel arg2) => { if (arg2 == null || String.IsNullOrEmpty(arg2.Title)) { return; } Type target = null; if (arg2.Title.Equals(DrawerShared.navigation_item_my_cards, StringComparison.InvariantCultureIgnoreCase)) { target = typeof(MyCardsViewController); } else if (arg2.Title.Equals(DrawerShared.navigation_item_settings, StringComparison.InvariantCultureIgnoreCase)) { target = typeof(SettingsViewController); } else if (arg2.Title.Equals(DrawerShared.navigation_item_discover, StringComparison.InvariantCultureIgnoreCase)) { target = typeof(DiscoverViewController); } else if (arg2.Title.Equals(DrawerShared.navigation_item_connections, StringComparison.InvariantCultureIgnoreCase)) { target = typeof(ConnectionsTableViewController); } if (target != null) { ApplicationExtensions.ActivatePage(target, true, false); DismissViewController(true, null); } }; TableView.Source = TableSource; }
static void GoToDiscoverPage(bool animated) { ApplicationExtensions.DismissAllViewControllers(animated, true); ApplicationExtensions.ActivatePage(typeof(DiscoverViewController), animated, true); }