---
title: GCEventInteraction
framework: gamecontroller
role: symbol
role_heading: Class
path: gamecontroller/gceventinteraction
---

# GCEventInteraction

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

## Declaration

```swift
class GCEventInteraction
```

## Mentioned in

Discovering game controllers

## Overview

Overview 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()](gamecontroller/gceventinteraction/init().md)

### Receiving view events

- [receivesEventsInView](gamecontroller/gceventinteraction/receiveseventsinview.md)
- [GameControllerEventHandlingOptions](gamecontroller/gamecontrollereventhandlingoptions.md)

### Getting the event types

- [handledEventTypes](gamecontroller/gceventinteraction/handledeventtypes.md)
- [GCUIEventTypes](gamecontroller/gcuieventtypes.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [Copyable](swift/copyable.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [UIInteraction](uikit/uiinteraction.md)

## See Also

### Responding to a paused controller or controller event

- [controllerPausedHandler](gamecontroller/gccontroller/controllerpausedhandler.md)
- [GCGameControllerSceneDelegate](gamecontroller/gcgamecontrollerscenedelegate.md)
