<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIScrollView/isDirectionalLockEnabled",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIScrollView(py)directionalLockEnabled"
  },
  "title" : "isDirectionalLockEnabled"
}
-->

# isDirectionalLockEnabled

A Boolean value that determines whether scrolling is disabled in a particular direction.

```
var isDirectionalLockEnabled: Bool { get set }
```

## Discussion

If this property is <doc://com.apple.documentation/documentation/Swift/false>, scrolling is permitted in both horizontal and vertical directions. If this property is <doc://com.apple.documentation/documentation/Swift/true> and the user begins dragging in one general direction (horizontally or vertically), the scroll view disables scrolling in the other direction. If the drag direction is diagonal, then scrolling doesn’t lock and the user can drag in any direction until the drag completes. The default value is <doc://com.apple.documentation/documentation/Swift/false>.

---

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)