---
title: "tabBarController(_:shouldSelectTab:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitabbarcontrollerdelegate/tabbarcontroller(_:shouldselecttab:)"
---

# tabBarController(_:shouldSelectTab:)

Asks the delegate whether the specified tab should be made active.

## Declaration

```swift
optional func tabBarController(_ tabBarController: UITabBarController, shouldSelectTab tab: UITab) -> Bool
```

## Discussion

Discussion Return @c YES if the specified @c tab can be selected by the user. Otherwise, return @c NO
