---
title: "tabBarController(_:sidebarVisibilityWillChange:animator:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitabbarcontroller/sidebar-swift.class/delegate-swift.protocol/tabbarcontroller(_:sidebarvisibilitywillchange:animator:)"
---

# tabBarController(_:sidebarVisibilityWillChange:animator:)

Notifies the delegate when the visibility of the sidebar is about to change when sidebar.isHidden changes. Add animations to the animator to run alongside the visibility update. Alongside animations and completions will run immediately if the sidebar visibility is changed without animation.

## Declaration

```swift
optional func tabBarController(_ tabBarController: UITabBarController, sidebarVisibilityWillChange sidebar: UITabBarController.Sidebar, animator: any UITabBarController.Sidebar.Animating)
```
