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

# runLoopModes

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

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

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

[`perform(_:target:argument:order:modes:)`](/documentation/Foundation/RunLoop/perform(_:target:argument:order:modes:))

Schedules the sending of a message on the receiver.



---

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)