Skip to content

UIScrollView: isDragging property ​

The isDragging property indicates that the user is dragging.

Value ​

A boolean.

ValueMeaning
trueThe user is dragging
falseOtherwise
  • Read-only. Assigning to it throws TypeError.
  • false for a new scroll view.
  • dragbegin fires when it becomes true, and dragend when it becomes false.

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.

See also ​