Change color of translucent black UINavigationBar

Once you know it, it’s fairly simple: self.navigationController.navigationBar.tintColor = [UIColor blueColor]; self.navigationController.navigationBar.alpha = 0.7f; self.navigationController.navigationBar.translucent = YES; The translucent property seems only to determine wether the main view should be visible under the navigation bar, and resizes the view appropiately.

How to prevent status bar from overlapping content with hidesBarsOnSwipe set on UINavigationController?

Actually it is pretty easy to do. You just need to connect navigation isNavigationBarHidden property with status bar. Objective-C – (BOOL)prefersStatusBarHidden { return self.navigationController.isNavigationBarHidden; } Swift <= 2.3 override func prefersStatusBarHidden() -> Bool { return navigationController?.navigationBarHidden ?? false } Swift 3.0 override var prefersStatusBarHidden: Bool { return navigationController?.isNavigationBarHidden ?? false } And be sure you … Read more

Setting a property in a segue with Navigation Controller containing another view

Since the destination view controller is actually the navigation controller, try accessing the root view like so: UINavigationController *navController = [segue destinationViewController]; ShowItemsTableViewController *SITViewController = (ShowItemsTableViewController *)([navController viewControllers][0]); [SITViewController setItems:[self itemsFromCoreData]];

Prevent automatic popToRootViewController on double-tap of UITabBarController

Use the tabBarController:shouldSelectViewController: method of the UITabBarControllerDelegate protocol. – (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController { return viewController != tabBarController.selectedViewController; } Don’t forget to set the delegate of the tab bar controller to the object that actually implements this delegate method.

Getting interactivePopGestureRecognizer dismiss callback/event

I know this is old but for anyone else who might be facing similar problems. Here is the approach I used. First I register a UINavigationControllerDelegate to my navigation controller. The delegate needs to implement. Objective-C – (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated Swift func navigationController(navigationController: UINavigationController, willShowViewController viewController: UIViewController, animated: Bool) So the implementation would … Read more