---
title: GCController.DidBecomeCurrentMessage
framework: gamecontroller
role: symbol
role_heading: Structure
path: gamecontroller/gccontroller/didbecomecurrentmessage
---

# GCController.DidBecomeCurrentMessage

A message that posts after a game controller becomes the most recently used controller.

## Declaration

```swift
struct DidBecomeCurrentMessage
```

## Overview

Overview This is a good time to swap out UI to match the new current controller, and unregister any handlers with the old current controller. Use the .didBecomeCurrent identifier with NotificationCenter to listen for this message. let observation = NotificationCenter.default.addObserver(of: GCController.self, for: .didBecomeCurrent) { message in    let controller = message.controller }

## Topics

### Initializers

- [init(controller:)](gamecontroller/gccontroller/didbecomecurrentmessage/init(controller:).md)

### Instance Properties

- [controller](gamecontroller/gccontroller/didbecomecurrentmessage/controller.md)

## Relationships

### Conforms To

- [NotificationCenter.MainActorMessage](foundation/notificationcenter/mainactormessage.md)
- [SendableMetatype](swift/sendablemetatype.md)
