<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/RunLoop/currentMode",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSRunLoop(py)currentMode"
  },
  "title" : "currentMode"
}
-->

# currentMode

The receiver’s current input mode.

```
var currentMode: RunLoop.Mode? { get }
```

## Discussion

The receiver’s current input mode. This method returns the current input mode *only* while the receiver is running; otherwise, it returns `nil`.

The current mode is set by the methods that run the run loop, such as [`acceptInput(forMode:before:)`](/documentation/Foundation/RunLoop/acceptInput(forMode:before:)) and [`run(mode:before:)`](/documentation/Foundation/RunLoop/run(mode:before:)).

## See Also

[`run(until:)`](/documentation/Foundation/RunLoop/run(until:))

Runs the loop until the specified date, during which time it processes data from all attached input sources.

[`run()`](/documentation/Foundation/RunLoop/run())

Puts the receiver into a permanent loop, during which time it processes data from all attached input sources.



---

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)