iOS Developer Library — Pre-Release

Developer

GameController Framework Reference GCControllerElement Class Reference

Options
Deployment Target:

On This Page
Language:

GCControllerElement

A 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. More...

Conforms To


Import Statement


Swift

import GameController

Objective-C

@import GameController;

Availability


Available in iOS 7.0 and later.
  • analog analog Property

    Returns a Boolean value that indicates whether the element provides analog data. (read-only)

    Declaration

    Swift

    var analog: Bool { get }

    Objective-C

    @property(readonly, getter=isAnalog) BOOL analog

    Discussion

    If the value is YEStrue, then the value properties defined by the element subclass can return a range (from minimum to maximum) of possible values. For example, this element might be a pressure-sensitive button or an axis of a thumb stick that allows for a range of physical movement. If the value is NOfalse, then the element’s value properties only provides discrete values, typically 0 if the element is off, and 1 if the element is on.

    Import Statement

    Swift

    import GameController

    Availability

    Available in iOS 7.0 and later.

  • Returns the element that this element is part of. (read-only)

    Declaration

    Swift

    weak var collection: GCControllerElement! { get }

    Objective-C

    @property(assign, readonly) GCControllerElement *collection

    Discussion

    If the element is part of another element, this property holds the parent element. Otherwise, it holds nil.

    Import Statement

    Swift

    import GameController

    Availability

    Available in iOS 7.0 and later.