<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TouchController",
  "identifier" : "/documentation/TouchController/TCSwitch",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Touch Controller"
    ],
    "preciseIdentifier" : "c:objc(cs)TCSwitch"
  },
  "title" : "TCSwitch"
}
-->

# TCSwitch

A control that represents a single on-screen switch.

```
class TCSwitch
```

## Overview

This is mirrored by a <doc://com.apple.documentation/documentation/GameController/GCControllerButtonInput>
on the associated <doc://com.apple.documentation/documentation/GameController/GCController>.

## Topics

### Inspecting the switch

[`var contents: TCControlContents?`](/documentation/TouchController/TCSwitch/contents)

The contents for the switch in its normal state.

[`var highlightDuration: TimeInterval`](/documentation/TouchController/TCSwitch/highlightDuration)

The time it takes for a highlight to fade away, in seconds.

[`var isSwitchedOn: Bool`](/documentation/TouchController/TCSwitch/isSwitchedOn)

A Boolean value that indicates whether the switch is currently switched on.

[`var switchedOnContents: TCControlContents?`](/documentation/TouchController/TCSwitch/switchedOnContents)

The contents for the switch when it is switched on.

### Getting the collider shape

[`var colliderShape: TCColliderShape`](/documentation/TouchController/TCSwitch/colliderShape)

The collider shape for the switch.

[`enum TCColliderShape`](/documentation/TouchController/TCColliderShape)

Defines the shape of a control collider.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`TCControl`](/documentation/TouchController/TCControl)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`TCControlLayout`](/documentation/TouchController/TCControlLayout)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)