UINavigationControoller - setNavigationBarHidden:animated: How to sync other animations

二次信任 提交于 2019-12-05 13:48:06
Stefan Ticu

If you check the UINavigationController documentation there is this line:

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

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

 [self.navigationController setNavigationBarHidden:YES animated:YES];
 [UIView transitionWithView:self.view 
                   duration:UINavigationControllerHideShowBarDuration
                    options:UIViewAnimationOptionCurveLinear
                 animations:^
  {
   /* Put other animation code here ;) */
  }
                 completion:^(BOOL finished) 
  {                                  
  }];
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!