Skip to content

UIScrollView: isScrollAnimating property ​

The isScrollAnimating property indicates that an animation started by setContentOffset() is running.

Value ​

A boolean.

ValueMeaning
trueAn animation started by setContentOffset() is running
falseOtherwise
  • Read-only. Assigning to it throws TypeError.
  • false for a new scroll view.
  • scrollanimationend fires when the animation ends.

Examples ​

js
const scroller = new UIScrollView();
scroller.addEventListener('scroll', () => {
  console.log(scroller.isScrollAnimating);
});

Effect: logs this state while scrolling. It is true while an animation started by setContentOffset() is running.

Corresponding iOS API ​

UIScrollView.isScrollAnimating.

See also ​