Search code examples
swiftanimationuiviewuinavigationcontrollernstimeinterval

Default Time Interval for setNavigationBarHidden(Bool, Bool) Animation


What is the default time interval for Swift animations like the setNavigationBarHidden(Bool, animated: Bool) and setToolbarHidden(Bool, animated: Bool) methods of the UINavigationController class? I would like to know so that my animations match the same duration.


Solution

  • From Apple docs:

    UINavigationControllerHideShowBarDuration

    A global constant that specifies a preferred duration when animating the navigation bar. This variable specifies the duration when animating the navigation bar.

    It is 0.2 seconds.