<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameController",
  "identifier" : "/documentation/GameController/GCEventInteraction",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Game Controller"
    ],
    "preciseIdentifier" : "c:objc(cs)GCEventInteraction"
  },
  "title" : "GCEventInteraction"
}
-->

# GCEventInteraction

An interaction that indicates the view’s intent to receive game controller
events through the Game Controller framework.

```
class GCEventInteraction
```

## Overview\discussion On visionOS, users can interact with your app using a game controller. By
default, the system converts game controller actions into pinch events and
sends them to the view the user is gazing at, its gesture recognizers, and
then up the responder chain.

If you use the Game Controller framework to handle game controller events
for part of your user interface, add an instance of `GCEventInteraction`
to the root of that part of your app’s view hierarchy.  For example, if you
are writing a game using Metal, add this interaction to the view that hosts
your game’s `CAMetalLayer`.

\note This class should not be subclassed.

## Topics

### Creating an interaction

[`-  init`](/documentation/GameController/GCEventInteraction/init())

### Receiving view events

[`receivesEventsInView`](/documentation/GameController/GCEventInteraction/receivesEventsInView)

A Boolean value that determines whether events are delivered exclusively
through the Game Controller framework.

[`GameControllerEventHandlingOptions`](/documentation/GameController/GameControllerEventHandlingOptions)

### Getting the event types

[`handledEventTypes`](/documentation/GameController/GCEventInteraction/handledEventTypes)

The types of game controller events that should be delivered through the Game Controller framework.

[`GCUIEventTypes`](/documentation/GameController/GCUIEventTypes)

## Relationships

### Conforms To

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

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

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

[`UIInteraction`](/documentation/UIKit/UIInteraction)

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

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

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

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

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

### 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)