<!--
{
  "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/Mode",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@T@NSRunLoopMode"
  },
  "title" : "RunLoop.Mode"
}
-->

# RunLoop.Mode

Modes that a run loop operates in.

```
struct Mode
```

## Discussion

<doc://com.apple.documentation/documentation/AppKit/NSApplication> defines additional run loop modes, including the following:

- [`modalPanel`](/documentation/Foundation/RunLoop/Mode/modalPanel)
- [`eventTracking`](/documentation/Foundation/RunLoop/Mode/eventTracking)

## Topics

### System Run Loop Modes

[`common`](/documentation/Foundation/RunLoop/Mode/common)

A pseudo-mode that includes one or more other run loop modes.

[`default`](/documentation/Foundation/RunLoop/Mode/default)

The mode set to handle input sources other than connection objects.

[`eventTracking`](/documentation/Foundation/RunLoop/Mode/eventTracking)

The mode set when tracking events modally, such as a mouse-dragging loop.

[`modalPanel`](/documentation/Foundation/RunLoop/Mode/modalPanel)

The mode set when waiting for input from a modal panel, such as a save or open panel.

[`tracking`](/documentation/Foundation/RunLoop/Mode/tracking)

The mode set while tracking in controls takes place.

### Run Loop Mode Creation

[`init(_:)`](/documentation/Foundation/RunLoop/Mode/init(_:))

Creates a run loop mode using the specified string value.

[`init(rawValue:)`](/documentation/Foundation/RunLoop/Mode/init(rawValue:))

Creates a run loop mode using the specified raw string value.



---

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)