public override void ViewDidAppear(bool animated) { base.ViewDidAppear(animated); if (!AppDelegate.MomentsManager.AccountManager.LoggedIn) { LoginViewController loginViewController = new LoginViewController(); this.NavigationController.PresentViewController(loginViewController, true, null); } }
public override void ViewDidAppear(bool animated) { base.ViewDidAppear(animated); this.TabBarController.NavigationItem.Title = "Capture"; this.TabBarController.NavigationItem.TitleView = null; UIBarButtonItem logoutItem = new UIBarButtonItem("Logout", UIBarButtonItemStyle.Plain, delegate { AppDelegate.MomentsManager.AccountManager.Logout(); LoginViewController loginViewController = new LoginViewController(); this.NavigationController.PresentViewController(loginViewController, true, null); }); this.NavigationController.NavigationBar.TopItem.RightBarButtonItem = logoutItem; }