---
title: runLoopModes
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/undomanager/runloopmodes
---

# runLoopModes

The modes governing the types of input to handle during a cycle of the run loop.

## Declaration

```swift
var runLoopModes: [RunLoop.Mode] { get set }
```

## Discussion

Discussion An array of string constants specifying the current run-loop modes. By default, the sole run-loop mode is NSDefaultRunLoopMode (which excludes data from NSConnection objects). Some examples of other uses are to limit the input to data received during a mouse-tracking session by setting the mode to NSEventTrackingRunLoopMode, or limit it to data received from a modal panel with NSModalPanelRunLoopMode.

## See Also

### Related Documentation

- [perform(_:target:argument:order:modes:)](foundation/runloop/perform(_:target:argument:order:modes:).md)

### Working with run loops

- [NSUndoCloseGroupingRunLoopOrdering](foundation/nsundoclosegroupingrunloopordering.md)
