public override void ViewDidLoad() { tab1 = new CurrentDatesViewController(); tab1.TabBarItem = new UITabBarItem ("CurrentDates_Tab".Localize(), UIImage.FromBundle ("CurrentDatesIcon"), 0); tab2 = new MatchingDatesViewController(); tab2.TabBarItem = new UITabBarItem ("MatchingDates_Tab".Localize(), UIImage.FromBundle ("MatchingDatesIcon"), 1); tab3 = new InterestedDatesViewController(); tab3.TabBarItem = new UITabBarItem ("InterestedPeople_Tab".Localize(), UIImage.FromBundle ("AppliedDatesIcon"), 2); tab4 = new PostedDatesViewController(); tab4.TabBarItem = new UITabBarItem ("PostedDates_Tab".Localize(), UIImage.FromBundle ("PostedDatesIcon"), 2); var tabs = new UIViewController[] { tab1, tab2, tab3, tab4 }; ViewControllers = tabs; Instance = this; }
public HomeScreenViewController() : base(null, null) { //PrepareChannelBar(); homeDateView = new ODHomeVC(); homeDateView.TabBarItem = new UITabBarItem ("HomeDates_Tab".Localize(), UIImage.FromBundle ("home_off_black"), 0); matchingDatesView = new MatchingDatesViewController(); matchingDatesView.TabBarItem = new UITabBarItem ("MatchingDates_Tab".Localize(), UIImage.FromBundle ("matches_on_black"), 1); notificationsView = new NotificationsViewController(); notificationsView.TabBarItem = new UITabBarItem ("Notifications_Tab".Localize(), UIImage.FromBundle ("messages_on_black"), 2); var tabs = new UIViewController[] { homeDateView, matchingDatesView, notificationsView }; ViewControllers = tabs; //this.Title = "OpenDate"; UIBarButtonItem menuBtn = new UIBarButtonItem ("Menu", UIBarButtonItemStyle.Plain, null); UIBarButtonItem newBtn = new UIBarButtonItem (UIBarButtonSystemItem.Add); this.NavigationItem.SetLeftBarButtonItem (menuBtn, false); this.NavigationItem.SetRightBarButtonItem (newBtn, true); menuBtn.Clicked += (object sender, EventArgs e) => { SidebarController.ToggleMenu(); }; newBtn.Clicked += (object sender, EventArgs e) => { ProposeDatesViewController proposeController = new ProposeDatesViewController (); if (proposeController != null) { this.NavigationController.PresentModalViewController (proposeController, true); } }; TabBar.TintColor = LettuceColor.BoyBlue; }