The app I\'m working on changes the barTintColor
of its navigation bar when pushing new view controllers. Right now we set that colour in the destination view contr
You can add extra animations that match the timing and animation curve of the view controller transition using UIViewControllerTransitionCoordinator.
A view controller's transitionCoordinator
will be set after a view controller's animation has started (so in viewWillAppear
of the presented view controller). Add any extra animations using animateAlongsideTransition:completion:
on the transition coordinator.
An example:
[[self transitionCoordinator] animateAlongsideTransition:^(id context) {
self.navigationController.navigationBar.translucent = NO;
self.navigationController.navigationBar.barStyle = UIBarStyleBlack;
self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
self.navigationController.navigationBar.barTintColor = [UIColor redColor];
} completion:nil];