<!--
{
  "availability" : [
    "iOS: 18.4.0 -",
    "iPadOS: 18.4.0 -",
    "macCatalyst: 18.4.0 -",
    "visionOS: 2.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITabBarController/Sidebar-swift.class/Delegate-swift.protocol/tabBarController(_:sidebar:itemsForAddingTo:tab:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UITabBarControllerSidebarDelegate(im)tabBarController:sidebar:itemsForAddingToDragSession:tab:"
  },
  "title" : "tabBarController(_:sidebar:itemsForAddingTo:tab:)"
}
-->

# 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.

```
optional func tabBarController(_ tabBarController: UITabBarController, sidebar: UITabBarController.Sidebar, itemsForAddingTo dragSession: any UIDragSession, tab: UITab) -> [UIDragItem]
```

---

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)