Skip to content

UIScrollView: isDecelerating property ​

The isDecelerating property indicates that the user has lifted their finger and the content is still sliding.

Value ​

A boolean.

ValueMeaning
trueThe user has lifted their finger and the content is still sliding
falseOtherwise
  • Read-only. Assigning to it throws TypeError.
  • false for a new scroll view.
  • deceleratebegin fires when it becomes true, and decelerateend when it becomes false.

Examples ​

js
const scroller = new UIScrollView();
scroller.addEventListener('dragend', () => {
  if (!scroller.isDecelerating) console.log('Already stopped at release');
});

Effect: when the finger lifts with no velocity and the content stops sliding, the console logs Already stopped at release. Not verified in the simulator.

Corresponding iOS API ​

UIScrollView.decelerating.

See also ​