An input associated with a physical control, such as a button or thumbstick.
- iOS 7.0+
- macOS 10.9+
- tvOS 9.0+
Elements are mapped to physical controls on a controller. When a player manipulates a control, the corresponding element's values change. This class is never instantiated directly. Instead, subclasses represent different kinds of elements.
An element class usually represents an isolated element, such as a button, whose values can be read. However, an element can itself have child elements. For example, a direction pad is a two-dimensional control whose values can either be read as a pair of axis elements or four button elements. If an element is a child of another element, its collection property points to its parent element.
is property determines whether the element returns a range of values or discrete (digital) values.