Class

GCGamepad

The standard set of gamepad controls.

Declaration

class GCGamepad : NSObject

Overview

The controls associated with the gamepad profile include the following:

  • Two shoulder buttons.

  • Four face buttons arranged in a diamond pattern.

  • One directional pad (D-pad).

Topics

Determining the Controller That Owns This Profile

var controller: GCController?

The controller this profile is associated with.

Determining When Any Element in the Profile Changes

var valueChangedHandler: GCGamepadValueChangedHandler?

A block called when any element in the profile changes.

Reading Shoulder Button Inputs

var leftShoulder: GCControllerButtonInput

The left shoulder button element.

var rightShoulder: GCControllerButtonInput

The right shoulder button element.

Reading Directional Pad Inputs

Reading Face Button Inputs

Saving a Snapshot

func saveSnapshot() -> GCGamepadSnapshot

Saves a snapshot of all of the profile’s elements.

Constants

typealias GCGamepadValueChangedHandler

Signature for the block executed if any element in the gamepad profile changes value.

Relationships

Inherits From

Conforms To

See Also

Control Profiles

class GCExtendedGamepad

The extended set of gamepad controls.

class GCMicroGamepad

The controls provided by the Siri Remote.

class GCMotion

The orientation and motion of the controller.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software