---
title: "metalDisplayLink(_:needsUpdate:)"
framework: quartzcore
role: symbol
role_heading: Instance Method
path: "quartzcore/cametaldisplaylinkdelegate/metaldisplaylink(_:needsupdate:)"
---

# metalDisplayLink(_:needsUpdate:)

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

## Declaration

```swift
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 doc://com.apple.quartzcore/documentation/QuartzCore/CAMetalDrawable instance, and a deadline to call its doc://com.apple.documentation/documentation/Metal/MTLDrawable/present() method.

## Discussion

Discussion In this method’s implementation, perform your app’s rendering on the layer or texture of the update instance’s drawable property. Before calling present(), encode all your Metal commands to the link parameter’s 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 property. warning: Using alternative methods to present() that target the presentation for a specific time cause an assert when used with a CAMetalDisplayLink.
