<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIDragDropSession/canLoadObjects(ofClass:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIDragDropSession(im)canLoadObjectsOfClass:"
  },
  "title" : "canLoadObjects(ofClass:)"
}
-->

# canLoadObjects(ofClass:)

Returns a Boolean value that indicates whether at least one drag item in the session can create an instance of the specified class.

```
func canLoadObjects(ofClass aClass: any NSItemProviderReading.Type) -> Bool
```

## Parameters

`aClass`

A class conforming to the <doc://com.apple.documentation/documentation/Foundation/NSItemProviderReading> protocol.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if at least one drag item in the session can create an instance of the specified class; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

---

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)