Swift
func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) { if #available(iOS 11.2, *) { navigationBar.tintAdjustmentMode = .normal navigationBar.tintAdjustmentMode = .automatic } }
Objective-C
-(void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated { if (@available(iOS 11.2, *)) { self.navigationBar.tintAdjustmentMode = UIViewTintAdjustmentModeNormal; self.navigationBar.tintAdjustmentMode = UIViewTintAdjustmentModeAutomatic; } }