GCControllerElement object represents a measurable value on a controller profile. Typically, elements are mapped to physical controls on a controller. When a player manipulates those controls, the element object’s values change. The
GCControllerElement class is never instantiated directly. Instead, subclasses that represent the different kinds of elements are instantiated.
Table 1 lists the supported element types.
- iOS 7.0+
- macOS 10.9+
- tvOS 7.0+
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.
isAnalog property determines whether the element returns a range of values or discrete (digital) values.