<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITabBarController/Sidebar-swift.class/Delegate-swift.protocol",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UITabBarControllerSidebarDelegate"
  },
  "title" : "UITabBarController.Sidebar.Delegate"
}
-->

# UITabBarController.Sidebar.Delegate

```
@MainActor protocol Delegate : NSObjectProtocol
```

## Topics

### Instance Methods

[`func tabBarController(UITabBarController, sidebar: UITabBarController.Sidebar, contextMenuConfigurationFor: UITab) -> UIContextMenuConfiguration?`](/documentation/UIKit/UITabBarController/Sidebar-swift.class/Delegate-swift.protocol/tabBarController(_:sidebar:contextMenuConfigurationFor:))

Called when the sidebar is about to display a context menu for the specified `tab`.
Return either a concrete `UIContextMenuConfiguration` or nil if the tab does not show context menus.

[`func tabBarController(UITabBarController, sidebar: UITabBarController.Sidebar, didEndDisplaying: UITab)`](/documentation/UIKit/UITabBarController/Sidebar-swift.class/Delegate-swift.protocol/tabBarController(_:sidebar:didEndDisplaying:))

Notifies the delegate when the sidebar has finished displaying the row representing the specified `tab`

[`func tabBarController(UITabBarController, sidebar: UITabBarController.Sidebar, itemFor: UITabSidebarItem.Request) -> UITabSidebarItem`](/documentation/UIKit/UITabBarController/Sidebar-swift.class/Delegate-swift.protocol/tabBarController(_:sidebar:itemFor:))

Return a `UITabSidebarItem` for the specified item request. When created, the item will be preconfigured
to the appropriate defaults for its given content. If this method is not implemented, a default sidebar
item will be provided for the request.

[`func tabBarController(UITabBarController, sidebar: UITabBarController.Sidebar, itemsForAddingTo: any UIDragSession, tab: UITab) -> [UIDragItem]`](/documentation/UIKit/UITabBarController/Sidebar-swift.class/Delegate-swift.protocol/tabBarController(_:sidebar:itemsForAddingTo:tab:))

Called when a new drag session is requesting items to add to the existing drag session in the sidebar from the specified `tab`.
Return items if the specified tab can add to the drag session, or an empty array if nothing should be added.

[`func tabBarController(UITabBarController, sidebar: UITabBarController.Sidebar, itemsForBeginning: any UIDragSession, tab: UITab) -> [UIDragItem]`](/documentation/UIKit/UITabBarController/Sidebar-swift.class/Delegate-swift.protocol/tabBarController(_:sidebar:itemsForBeginning:tab:))

Called when a new drag session has begun in the sidebar from the specified `tab`. Return drag items if the specified tab can be dragged, or an empty array if no drags should begin.
Note that if drag items are returned on tabs in groups that allow reordering, then tab reordering is disabled when the sidebar is not in editing.

[`func tabBarController(UITabBarController, sidebar: UITabBarController.Sidebar, leadingSwipeActionsConfigurationFor: UITab) -> UISwipeActionsConfiguration?`](/documentation/UIKit/UITabBarController/Sidebar-swift.class/Delegate-swift.protocol/tabBarController(_:sidebar:leadingSwipeActionsConfigurationFor:))

Called when the sidebar is about to show leading swipe actions for the specified `tab`.
Return either a concrete `UISwipeActionsConfiguration` or nil if the tab does not show swipe actions.

[`func tabBarController(UITabBarController, sidebar: UITabBarController.Sidebar, sidebarAction: UIAction, group: UITabGroup, acceptItemsFrom: any UIDropSession)`](/documentation/UIKit/UITabBarController/Sidebar-swift.class/Delegate-swift.protocol/tabBarController(_:sidebar:sidebarAction:group:acceptItemsFrom:))

Receive the drop from into the `sidebarAction` using the specified session. This is only called if the drop operation returned
from `tabBarController:sidebar:sidebarAction:operationForAcceptingItemsFromDropSession` is valid for a drop.

[`func tabBarController(UITabBarController, sidebar: UITabBarController.Sidebar, sidebarAction: UIAction, group: UITabGroup, operationForAcceptingItemsFrom: any UIDropSession) -> UIDropOperation`](/documentation/UIKit/UITabBarController/Sidebar-swift.class/Delegate-swift.protocol/tabBarController(_:sidebar:sidebarAction:group:operationForAcceptingItemsFrom:))

Determines if items from the specified drop session can be dropped into the specified `sidebarAction`. If the operation is either a `.move` or `.copy`,
then the drop will proceed and `tabBarController:sidebar:sidebarAction:acceptItemsFromDropSession:` is called. By default, the drop will be
treated as a cancel operation if this is not implemented.

[`func tabBarController(UITabBarController, sidebar: UITabBarController.Sidebar, trailingSwipeActionsConfigurationFor: UITab) -> UISwipeActionsConfiguration?`](/documentation/UIKit/UITabBarController/Sidebar-swift.class/Delegate-swift.protocol/tabBarController(_:sidebar:trailingSwipeActionsConfigurationFor:))

Called when the sidebar is about to show trailing swipe actions for a particular tab.
Return either a UISwipeActionsConfiguration object or nil if this tab does not show swipe actions.

[`func tabBarController(UITabBarController, sidebar: UITabBarController.Sidebar, update: UITabSidebarItem)`](/documentation/UIKit/UITabBarController/Sidebar-swift.class/Delegate-swift.protocol/tabBarController(_:sidebar:update:))

Called whenever the sidebar item’s `configurationState` changes or the item is reconfigured.
The passed in item will accrue all modifications until the delegate requests for a new sidebar
item from the delegate method `tabBarController:sidebar:itemForRequest:`

[`func tabBarController(UITabBarController, sidebar: UITabBarController.Sidebar, willBeginDisplaying: UITab)`](/documentation/UIKit/UITabBarController/Sidebar-swift.class/Delegate-swift.protocol/tabBarController(_:sidebar:willBeginDisplaying:))

Notifies the delegate when the sidebar is about to display the row representing the specified `tab`

[`func tabBarController(UITabBarController, sidebarAvailabilityDidChange: UITabBarController.Sidebar)`](/documentation/UIKit/UITabBarController/Sidebar-swift.class/Delegate-swift.protocol/tabBarController(_:sidebarAvailabilityDidChange:))

Notifies the delegate when `UITabBarController.Sidebar.isAvailable` changes.

[`func tabBarController(UITabBarController, sidebarVisibilityWillChange: UITabBarController.Sidebar, animator: any UITabBarController.Sidebar.Animating)`](/documentation/UIKit/UITabBarController/Sidebar-swift.class/Delegate-swift.protocol/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.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

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)