<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalKit",
  "identifier" : "/documentation/MetalKit/MTKTextureLoader/Callback",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "MetalKit"
    ],
    "preciseIdentifier" : "c:@T@MTKTextureLoaderCallback"
  },
  "title" : "MTKTextureLoader.Callback"
}
-->

# MTKTextureLoader.Callback

The signature for the block executed after an asynchronous loading operation for a single texture has completed.

```
typealias Callback = ((any MTLTexture)?, (any Error)?) -> Void
```

## Discussion

The block parameters are defined as follows:

- texture: A <doc://com.apple.documentation/documentation/Metal/MTLTexture> object, or `nil` if an error occurred.
- error: If the operation was successful, this value is `nil`; otherwise, this parameter holds an <doc://com.apple.documentation/documentation/Foundation/NSError> object that describes the problem that occurred.

---

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)