Contents

TCTouchController

An object that allows you to create and customize on-screen touch controls for a game that uses Metal.

Declaration

class TCTouchController

Overview

The controller exposes controls through a GCController instance, and enables seamless integration with the Game Controller framework.

This class manages the lifecycle of touch controls, handles user interaction, renders the controls using Metal, and provides a GCController instance that reflects the state of the on-screen controls.

Topics

Creating a touch controller

Inspecting the touch controller

Getting the touch controller

Adding a button control

Adding a directional pad control

Adding a switch control

Adding a throttle control

Adding a thumbstick control

Adding a touchpad control

Connecting and disconnecting a controller

Getting the controller at a point

Handling layout updates

Handling a touch

Removing controls

Getting the touch controller category