---
title: isDirectionalLockEnabled
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiscrollview/isdirectionallockenabled
---

# isDirectionalLockEnabled

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

## Declaration

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

## Discussion

Discussion If this property is false, scrolling is permitted in both horizontal and vertical directions. If this property is 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 false.

## See Also

### Configuring the scroll view

- [isScrollEnabled](uikit/uiscrollview/isscrollenabled.md)
- [isPagingEnabled](uikit/uiscrollview/ispagingenabled.md)
- [scrollsToTop](uikit/uiscrollview/scrollstotop.md)
- [bounces](uikit/uiscrollview/bounces.md)
- [bouncesHorizontally](uikit/uiscrollview/bounceshorizontally.md)
- [bouncesVertically](uikit/uiscrollview/bouncesvertically.md)
- [alwaysBounceVertical](uikit/uiscrollview/alwaysbouncevertical.md)
- [alwaysBounceHorizontal](uikit/uiscrollview/alwaysbouncehorizontal.md)
