TechnologiesGames & 3D

TouchController

iOSmacOStvOSwatchOSvisionOS

TouchController lets you build on-screen virtual game controllers whose buttons and controls are mirrored to GameController inputs, so touch gameplay drives the same input path as a physical controller. You assemble a TCTouchController from controls such as TCButton, TCDirectionPad, TCThumbstick, TCThrottle, TCSwitch, and TCTouchpad, configuring each through its matching descriptor type like TCButtonDescriptor or TCThumbstickDescriptor. Controls conform to the TCControl and TCControlLayout protocols and present their contents using TCControlContents, TCControlImage, and TCControlLabel, while TCControlLayoutAnchor and TCControlLayoutAnchorCoordinateSystem position them on screen. The framework is available on iOS and visionOS.

Essentials 2

Assemble an on-screen virtual controller whose touch inputs drive the same path as a physical game controller.

  • Cl
    TCTouchControlleriOS 26.0+
    An object that allows you to create and customize on-screen touch controls for a game that uses Metal.
  • Cl
    TCTouchControllerDescriptoriOS 26.0+
    A descriptor for configuring a touch controller.

Buttons and Switches 4

Add tappable buttons and toggle switches that map to discrete controller inputs.

  • Cl
    TCButtoniOS 26.0+
    A control that represents a single on-screen button.
  • Cl
    TCButtonDescriptoriOS 26.0+
    A descriptor for configuring a button.
  • Cl
    TCSwitchiOS 26.0+
    A control that represents a single on-screen switch.
  • Cl
    TCSwitchDescriptoriOS 26.0+
    A descriptor for configuring a switch.

Directional and Analog Controls 6

Provide direction pads, thumbsticks, and throttles for movement and analog input.

  • Cl
    TCDirectionPadiOS 26.0+
    An object that represents a direction pad.
  • Cl
    TCDirectionPadDescriptoriOS 26.0+
    A descriptor for configuring a directional pad.
  • Cl
    TCThumbstickiOS 26.0+
    Represents a single on-screen thumbstick.
  • Cl
    TCThumbstickDescriptoriOS 26.0+
    A descriptor for configuring a thumbstick.
  • Cl
    TCThrottleiOS 26.0+
    Represents a single on-screen throttle - a one axis input.
  • Cl
    TCThrottleDescriptoriOS 26.0+
    A descriptor for configuring a throttle.

Touch Surfaces 2

Capture free-form touch and drag input from an on-screen touchpad.

  • Cl
    TCTouchpadiOS 26.0+
    Represents a single on-screen touchpad that reports absolute coordinates or delta movements.
  • Cl
    TCTouchpadDescriptoriOS 26.0+
    A descriptor for configuring a touchpad.

Control Appearance 3

Define the visual contents, images, and labels presented by each on-screen control.

  • Cl
    TCControlContentsiOS 26.0+
    Represents the visual contents of a touch control.
  • Cl
    TCControlImageiOS 26.0+
    Represents an image to be rendered using Metal.
  • Cl
    TCControlLabeliOS 26.0+
    A label you associate with a touch control and provides a semantic description.

Control Protocols 2

Conform custom and built-in controls to the framework's control and layout interfaces.

  • Pr
    TCControliOS 26.0+
    A protocol that defines the base properties and methods for all touch controls.
  • Pr
    TCControlLayoutiOS 26.0+
    A protocol defining the controlLayout properties for a control.

Layout and Positioning 3

Anchor controls on screen and define their hit-testing shape and coordinate space.

  • En
    TCControlLayoutAnchoriOS 26.0+
    Defines the anchor point for a control.
  • En
    TCControlLayoutAnchorCoordinateSystemiOS 26.0+
    Defines the coodinate system for an anchor point.
  • En
    TCColliderShapeiOS 26.0+
    Defines the shape of a control collider.
← Games & 3D