LiveActivityContext
Structure
struct LiveActivityContext
Initializers
init(surface:availableWidth:)
init(surface: DropletSurfaceKind, availableWidth: CGFloat)
Creates a context. Constructed by hosts, read by droplets.
This exact overload remains the legacy ABI entry point and supplies the same settled presentation old hosts implicitly provided.
init(surface:availableWidth:presentation:)
init(surface: DropletSurfaceKind, availableWidth: CGFloat, presentation: LiveActivityPresentationState)
Creates a context with the current host presentation state.
Properties
availableWidth
let availableWidth: CGFloat
The width the card's content is given, inside the host's insets.
The host has already cleared the camera housing above and the opened shoulders either side, so this is the width you may actually use. The content is cardContentHeight tall.
presentation
let presentation: LiveActivityPresentationState
Live host presentation facts. Product views use these to freeze local animation or metering while the host is transitioning or concealed.
surface
let surface: DropletSurfaceKind
The surface kind hosting the activity.