---
title: currentMode
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/runloop/currentmode
---

# currentMode

The receiver’s current input mode.

## Declaration

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

## Discussion

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:) and run(mode:before:).

## See Also

### Related Documentation

- [run(until:)](foundation/runloop/run(until:).md)
- [run()](foundation/runloop/run().md)

### Accessing Run Loops and Modes

- [current](foundation/runloop/current.md)
- [limitDate(forMode:)](foundation/runloop/limitdate(formode:).md)
- [main](foundation/runloop/main.md)
- [getCFRunLoop()](foundation/runloop/getcfrunloop().md)
- [RunLoop.Mode](foundation/runloop/mode.md)
