UIScrollView: isDragging property
The isDragging property indicates that the user is dragging.
Value
A boolean.
| Value | Meaning |
|---|---|
true | The user is dragging |
false | Otherwise |
- Read-only. Assigning to it throws
TypeError. falsefor a new scroll view.dragbeginfires when it becomestrue, anddragendwhen it becomesfalse.
Examples
js
const scroller = new UIScrollView();
scroller.addEventListener('scroll', () => {
console.log(scroller.isDragging);
});Effect: logs this state while scrolling. It is true while the user is dragging.
Corresponding iOS API
UIScrollView.dragging.