Contents

UIUpdateActionPhase

An object that defines specific phases of the UI update process.

Declaration

@MainActor class UIUpdateActionPhase

Overview

Each UI update consists of several phases that run in a consistent order, and the UIUpdateActionPhase object defines constants that represent these phases. When using a UIUpdateLink, you can use these constants to decide which phase of the UI update process you want its actions to run in.

There are two phase groups: standard and low-latency. The standard phase group runs for each UI update. This phase group includes these phases, which run in the following order:

  1. beforeEventDispatch

  2. afterEventDispatch

  3. beforeCADisplayLinkDispatch

  4. afterCADisplayLinkDispatch

  5. beforeCATransactionCommit

  6. afterCATransactionCommit

The low-latency phase group is optional, and it’s off by default. It runs only if you explicitly request low-latency event dispatch using wantsLowLatencyEventDispatch. The low-latency phase group includes these phases, which run in the following order (after the standard phases):

  1. beforeLowLatencyEventDispatch

  2. afterLowLatencyEventDispatch

  3. beforeLowLatencyCATransactionCommit

  4. afterLowLatencyCATransactionCommit

When a phase group runs, all phases inside the group run. Phases run one after another in the specified order without exiting back into the run loop.

Topics

Phases

See Also

UI updates