<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameController",
  "identifier" : "/documentation/GameController/GCStylus/DidDisconnectMessage",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Game Controller",
      "GameController"
    ],
    "preciseIdentifier" : "s:So8GCStylusC14GameControllerE20DidDisconnectMessageV"
  },
  "title" : "GCStylus.DidDisconnectMessage"
}
-->

# GCStylus.DidDisconnectMessage

A message that posts after a stylus accessory disconnects from the
device.

```
struct DidDisconnectMessage
```

## Overview

Use the `.didDisconnect` identifier with `NotificationCenter` to listen
for this message.

```
let observation = NotificationCenter.default.addObserver(of: GCStylus.self, for: .didDisconnect) { message in
   let stylus = message.stylus
}
```

## Topics

### Initializers

[`init(stylus: GCStylus)`](/documentation/GameController/GCStylus/DidDisconnectMessage/init(stylus:))

### Instance Properties

[`var stylus: GCStylus`](/documentation/GameController/GCStylus/DidDisconnectMessage/stylus)

The stylus object that disconnected from the device.

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