4
votes

When I tap the status bar to the scroll to the top of a UIScrollView, the scroll indicators appear as it scrolls and then disappear once it stops.

When I programmatically scroll to the top using [scrollView setContentOffset:CGPointZero animated:YES], the scroll indicators disappear as it scrolls to the top.

Is there any way to programmatically produce similar behavior to what happens when the user taps on the status bar?

1

1 Answers

4
votes

Yes, there is and is exactly called like you actually presumed.

From the UIScrollView Reference

flashScrollIndicators

Displays the scroll indicators momentarily.

  • (void)flashScrollIndicators

Discussion You should call this method whenever you bring the scroll view to front.

Availability Available in iOS 2.0 and later. Declared In UIScrollView.h