<!--
{
  "availability" : [
    "macOS: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSHorizontalDirection/leading(relativeTo:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "s:6AppKit21NSHorizontalDirectionO7leading10relativeToACSo021NSUserInterfaceLayoutD0V_tFZ"
  },
  "title" : "leading(relativeTo:)"
}
-->

# leading(relativeTo:)

Returns the leading direction in the given user interface layout direction.

```
static func leading(relativeTo layoutDirection: NSUserInterfaceLayoutDirection) -> NSHorizontalDirection
```

---

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)