One Logo Pool Ball
GameController · IOS API REFERENCE

GCMouse.DidBecomeCurrentMessage

struct · iOS 26.0+ · SDK 27.1

struct DidBecomeCurrentMessage

A message that posts after a mouse becomes the most recently used mouse. Use the `.didBecomeCurrent` identifier with `NotificationCenter` to listen for this message. ``` let observation = NotificationCenter.default.addObserver(of: GCMouse.self, for: .didBecomeCurrent) { message in let mouse = message.mouse } ```

Members (5)

static · iOS 26.0+

makeMessage

TypeScript
static makeMessage(notification: _Foundation_Notification): Promise<(GCMouse_DidBecomeCurrentMessage) | null>
Swift declaration
@MainActor static func makeMessage(_ notification: Notification) -> GCMouse.DidBecomeCurrentMessage?

Converts a posted notification into this main actor message type for any observers. To implement this method in your own `MainActorMessage` conformance, retrieve values from the ``Notification``'s ``Notification/userInfo`` and set them as properties on the message. - Parameter notification: The posted ``Notification``. - Returns: The converted `MainActorMessage` or `nil` if conversion is not possible.

get · iOS 26.0+

name

TypeScript
static get nameValue(): _Foundation_NSNotification_Name
Swift declaration
static var name: Notification.Name { get }

A optional name corresponding to this type, used to interoperate with notification posters and observers.

get · iOS 26.0+

mouse

TypeScript
get mouse(): GCMouse
Swift declaration
var mouse: GCMouse

The mouse object that became current.

set · iOS 26.0+

mouse

TypeScript
set mouse(value: GCMouse)
Swift declaration
var mouse: GCMouse

The mouse object that became current.

init · iOS 26.0+

init

TypeScript
static init(mouse: GCMouse): GCMouse_DidBecomeCurrentMessage
Swift declaration
init(mouse: GCMouse)

Skipped declarations

No declarations were skipped in this snapshot.

All GameController types →