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

# loadObjects(ofClass:completion:)

Creates and loads a new instance of the specified class for each drag item in the session.

```
func loadObjects(ofClass aClass: any NSItemProviderReading.Type, completion: @escaping ([any NSItemProviderReading]) -> Void) -> Progress
```

## Parameters

`aClass`

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

`completion`

The block that is executed after all objects are loaded.

## Return Value

An aggregate of the load progress for each object that is loaded.

## Discussion

You can use this method only in the drop interaction delegate’s implementation of the [`dropInteraction(_:performDrop:)`](/documentation/UIKit/UIDropInteractionDelegate/dropInteraction(_:performDrop:)) method. This method is called after the user drops the items into the destination view.

The completion handler is called on the main queue. It provides an array of all objects created, in the same order that the drag items were added to the drag session.

---

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)