UINavigationControoller - setNavigationBarHidden: animated: how to synchronize other animations

How can I capture the animation curve and speed when I hide the navigation bar programmatically? I would like to sync other animations with this for fluid transition :)

+4
ios iphone uinavigationcontroller uinavigationbar
source share
2 answers

If you check the UINavigationController documentation, you will see the following line:

For animated transitions, the duration of the animation is determined by the value in the UINavigationControllerHideShowBarDuration constant.

+19
source share

Below is a snippet of code for those who would like to take advice from the accepted answer, but don’t know how to do it :)

  [self.navigationController setNavigationBarHidden:YES animated:YES]; [UIView transitionWithView:self.view duration:UINavigationControllerHideShowBarDuration options:UIViewAnimationOptionCurveLinear animations:^ { /* Put other animation code here ;) */ } completion:^(BOOL finished) { }]; 
+13
source share

All Articles