public override void ViewDidLoad() { base.ViewDidLoad(); Toolbar.BarStyle = UIBarStyle.Black; NavigationBar.BarStyle = UIBarStyle.Black; // Use any saved controller var viewControllers = ViewControllers.ToList(); switch (Settings.Current.LastControllerId) { case "Information": // Add the PickCategories to the stack for the back button _pickCategories = new PickCategoriesController(); viewControllers.Add(_pickCategories); ViewControllers = viewControllers.ToArray(); _controller = new InformationController(); break; case "ViewFeeds": { // Add the PickCategories to the stack _pickCategories = new PickCategoriesController(); viewControllers.Add(_pickCategories); ViewControllers = viewControllers.ToArray(); _controller = new ViewFeedsController(true); break; } default: // Default to pick categories _controller = new PickCategoriesController(); break; } PushViewController(_controller, true); }
public override void ViewDidLoad() { base.ViewDidLoad (); Toolbar.BarStyle = UIBarStyle.Black; NavigationBar.BarStyle = UIBarStyle.Black; // Use any saved controller var viewControllers = ViewControllers.ToList(); switch (Settings.Current.LastControllerId) { case "Information": // Add the PickCategories to the stack for the back button _pickCategories = new PickCategoriesController(); viewControllers.Add(_pickCategories); ViewControllers = viewControllers.ToArray(); _controller = new InformationController(); break; case "ViewFeeds": { // Add the PickCategories to the stack _pickCategories = new PickCategoriesController(); viewControllers.Add(_pickCategories); ViewControllers = viewControllers.ToArray(); _controller = new ViewFeedsController(true); break; } default: // Default to pick categories _controller = new PickCategoriesController(); break; } PushViewController(_controller, true); }
public override void ViewDidLoad() { Title = "Settings"; base.ViewDidLoad(); // Hide the navigation bar, back button and toolbar. NavigationController.SetToolbarHidden(true, false); NavigationItem.HidesBackButton = true; // 'Done' button in the top right _doneButton = new UIBarButtonItem(); _doneButton.Title = "Done"; _doneButton.Clicked += delegate(object sender, EventArgs e) { _pickCategories = new PickCategoriesController(); NavigationController.PushViewController(_pickCategories, false); UIView.BeginAnimations(null, IntPtr.Zero); UIView.SetAnimationDuration(0.5); UIView.SetAnimationTransition(UIViewAnimationTransition.FlipFromRight, NavigationController.View, true); UIView.CommitAnimations(); }; // Clear cache _clearButton = new UIBarButtonItem(); _clearButton.Title = "Clear cache"; _clearButton.Clicked += delegate(object sender, EventArgs e) { Settings.Current.ClearCache(true); ModalDialog.Alert("Cache cleared", "All cached items and images were removed"); }; NavigationItem.SetLeftBarButtonItem(_clearButton, false); NavigationItem.SetRightBarButtonItem(_doneButton, false); #if LOGGING AddDebugButtons(); #endif }
public override void ViewDidLoad() { Title = "Settings"; base.ViewDidLoad (); // Hide the navigation bar, back button and toolbar. NavigationController.SetToolbarHidden(true,false); NavigationItem.HidesBackButton = true; // 'Done' button in the top right _doneButton = new UIBarButtonItem(); _doneButton.Title = "Done"; _doneButton.Clicked += delegate(object sender, EventArgs e) { _pickCategories = new PickCategoriesController(); NavigationController.PushViewController(_pickCategories, false); UIView.BeginAnimations(null,IntPtr.Zero); UIView.SetAnimationDuration(0.5); UIView.SetAnimationTransition(UIViewAnimationTransition.FlipFromRight,NavigationController.View,true); UIView.CommitAnimations(); }; // Clear cache _clearButton = new UIBarButtonItem(); _clearButton.Title = "Clear cache"; _clearButton.Clicked += delegate(object sender, EventArgs e) { Settings.Current.ClearCache(true); ModalDialog.Alert("Cache cleared","All cached items and images were removed"); }; NavigationItem.SetLeftBarButtonItem(_clearButton,false); NavigationItem.SetRightBarButtonItem(_doneButton, false); #if LOGGING AddDebugButtons(); #endif }