<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITabBarControllerDelegate/tabBarController(_:displayedViewControllersFor:proposedViewControllers:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UITabBarControllerDelegate(im)tabBarController:displayedViewControllersForTab:proposedViewControllers:"
  },
  "title" : "tabBarController(_:displayedViewControllersFor:proposedViewControllers:)"
}
-->

# tabBarController(_:displayedViewControllersFor:proposedViewControllers:)

Used with `UITabGroup.managingNavigationController`, this method allows the delegate to customize the displayed view controllers
within the navigation stack for each level of selected tab. This method is called by the system if the selected tab in the `UITabBarController`
belongs to or is in the hierarchy of a managing tab group (i.e. a `UITabGroup` with a non-nil `managingNavigationController`). By default,
if this method is not implemented, the system will build the navigation stack by adding each tab’s `viewController` into the hierarchy, if one exists.
This is especially useful to hide certain view controllers when transitioning between compact and regular size classes.

```
optional func tabBarController(_ tabBarController: UITabBarController, displayedViewControllersFor tab: UITab, proposedViewControllers: [UIViewController]) -> [UIViewController]
```

## Parameters

`tabBarController`

The tab bar controller managed by the delegate.

`tab`

The tab for which the displayed view controllers is being requested for by its `managingTabGroup`. Each tab in the selection hierarchy will be called once.

`proposedViewControllers`

The proposed view controllers for the given tab. In general, the proposed view controller is a single-item array of the tab’s viewController. If other view controllers are pushed onto the navigation stack, they will be part of the last (leaf-most) tab’s `proposedViewControllers` such that they are preserved between updates.

## Return Value

A list of view controllers represented by the tab in the navigation stack.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)