<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuartzCore",
  "identifier" : "/documentation/QuartzCore/CAMetalDisplayLinkDelegate/metalDisplayLink(_:needsUpdate:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Animation"
    ],
    "preciseIdentifier" : "c:objc(pl)CAMetalDisplayLinkDelegate(im)metalDisplayLink:needsUpdate:"
  },
  "title" : "metalDisplayLink(_:needsUpdate:)"
}
-->

# metalDisplayLink(_:needsUpdate:)

A method the system calls to notify your app when it plans to update the display.

```
func metalDisplayLink(_ link: CAMetalDisplayLink, needsUpdate update: CAMetalDisplayLink.Update)
```

## Parameters

`link`

A Metal display link instance the system notifies.

`update`

An update instance that contains the time the system intends to update the display, a [`CAMetalDrawable`](/documentation/QuartzCore/CAMetalDrawable) instance, and a deadline to call its <doc://com.apple.documentation/documentation/Metal/MTLDrawable/present()> method.

## Discussion

In this method’s implementation, perform your app’s rendering on the [`layer`](/documentation/QuartzCore/CAMetalDrawable/layer) or [`texture`](/documentation/QuartzCore/CAMetalDrawable/texture) of the `update` instance’s [`drawable`](/documentation/QuartzCore/CAMetalDisplayLink/Update/drawable) property. Before calling <doc://com.apple.documentation/documentation/Metal/MTLDrawable/present()>, encode all your Metal commands to the `link` parameter’s <doc://com.apple.documentation/documentation/Metal/MTLDevice>. The GPU has additional time to complete running your commands before the frame displays on screen, determined by the value of the `link` parameter’s [`preferredFrameLatency`](/documentation/QuartzCore/CAMetalDisplayLink/preferredFrameLatency) property.

> Warning:
> Using alternative methods to <doc://com.apple.documentation/documentation/Metal/MTLDrawable/present()> that target the presentation for a specific time cause an assert when used with a ``doc://com.apple.quartzcore/documentation/QuartzCore/CAMetalDisplayLink``.

---

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)