UIScrollView: isScrollAnimating property
The isScrollAnimating property indicates that an animation started by setContentOffset() is running.
Value
A boolean.
| Value | Meaning |
|---|---|
true | An animation started by setContentOffset() is running |
false | Otherwise |
- Read-only. Assigning to it throws
TypeError. falsefor a new scroll view.scrollanimationendfires 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.