Show indicators when programmatically scrolling UIScrollView

I am writing a framework that simplifies the usual (but sometimes complicated) drag and drop tasks in iOS. Within this framework, when the user drags (and holds for a short time) an object near the scrollView edge, it scrolls scrollView programmatically in the direction of the edge.

I can scroll very well using -setContentOffset: animated: (passing NO for animated ones) and NSTimer, but scroll indicators are not displayed. This leads to confusing user experience (it can be difficult to say that it scrolls if the background is plain / non-textured).

I tried calling -flashScrollIndicators from my NSTimer callback (as set by contentOffset), but for some reason the indicators wait until the scroll completes before blinking.

The effect I want is for the indicators to appear while scrolling and then disappear after it stops. Basically, I want to get the same effect as when scrolling scrollView with the finger, which will be launched for my scrolling in the program caused by drag and drop.

Any ideas on how to achieve this?

+5
source share
1 answer

I think you can make some animation programs.

-2
source

All Articles