跳转至
Structure

SimultaneousGesture

A gesture containing two gestures that can happen at the same time with neither of them preceding the other.

Declaration

@frozen struct SimultaneousGesture<First, Second> : Gesture where First : Gesture, Second : Gesture

Overview

A simultaneous gesture is a container-event handler that evaluates its two child gestures at the same time. Its value is a struct with two optional values, each representing the phases of one of the two gestures.

SimultaneousGesture Example 1

See simultaneously(with:) for more of an explanation and an example.

Availability

iOS 13.0+

macOS 10.15+

tvOS 13.0+

watchOS 6.0+

Topics


Initializer

init(_:_:) Creates a gesture with two gestures that can receive updates or succeed independently of each other.


Type Alias

Body The type of gesture representing the body of Self.


Instance Property

first The first of two gestures that can happen simultaneously.

second The second of two gestures that can happen simultaneously.


Structure

Value The value of a simultaneous gesture that indicates which of its two gestures receives events.