<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameController",
  "identifier" : "/documentation/GameController/GCController/DidBecomeCurrentMessage",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Game Controller",
      "GameController"
    ],
    "preciseIdentifier" : "s:So12GCControllerC14GameControllerE23DidBecomeCurrentMessageV"
  },
  "title" : "GCController.DidBecomeCurrentMessage"
}
-->

# GCController.DidBecomeCurrentMessage

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

```
struct DidBecomeCurrentMessage
```

## 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: GCController)`](/documentation/GameController/GCController/DidBecomeCurrentMessage/init(controller:))

### Instance Properties

[`var controller: GCController`](/documentation/GameController/GCController/DidBecomeCurrentMessage/controller)

The controller object that became current.

## Relationships

### Conforms To

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

[`MainActorMessage`](/documentation/Foundation/NotificationCenter/MainActorMessage)

---

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)