Framework

Game Controller

Support hardware game controllers in your game.

Overview

The Game Controller framework is used to discover game controllers connected to a device and receive input data from them. You use control profiles to map the physical controls on the device to the inputs needed in your game. After retrieving a profile from the controller, you can either poll the current values of its controls or add handlers to be called when control values change. For more about implementing support for game controllers, see Game Controller Programming Guide.

Topics

Game Controllers

class GCController

A representation of a physical game controller, connected to the device either physically or through a wireless connection.

Input Elements

class GCControllerElement

An input associated with a physical control, such as a button or thumbstick.

class GCControllerAxisInput

A control element measuring movement along a particular axis.

class GCControllerButtonInput

A control element measuring a button press.

class GCControllerDirectionPad

A control element associated with a directional pad or a thumbstick.

Control Profiles

A profile maps the hardware controls of a particular controller to a predefined set of elements.

class GCExtendedGamepad

The extended set of gamepad controls.

class GCGamepad

The standard set of gamepad controls.

class GCMicroGamepad

The controls provided by the Siri Remote.

class GCMotion

The orientation and motion of the controller.

Profile Snapshots

Snapshots are used to save the current values of a profile's elements to an object that can be read later.

class GCExtendedGamepadSnapshot

A recording of all of the values provided by a GCExtendedGamepad object.

class GCGamepadSnapshot

A recording of all of the values provided by a GCGamepad object.

class GCMicroGamepadSnapshot

A recording of all of the values provided by a GCMicroGamepad object.

Routing Events

class GCEventViewController

A view controller that determines how game controller input data is routed by the operating system.

See Also