UIScrollView
streches a small, semi-transparent circle image to generate its scrollbars. You can find this image as the first subview of a UIScrollView
:
UIImageView *circle = [scrollView.subviews objectAtIndex:0];
However, as I said this image is stretched, and as far as I can tell, only the alpha values are considered when drawing the scroll bars.
So for example if you're only interested in changing the top/bottom ends of the scroll bar, you can try to change this image. However, I doubt you'll be able to do anything interesting.
A possible solution that comes to mind, and this is only a theory, is to add a custom, transparent UIView
on top of a UIScrollView
. Then you can hide the default scroll bar (by using showsHorizontalScrollIndicator
and showsVerticalScrollIndicator
), pass the necessary touch events to the UIScrollView
to scroll the content, and draw the scrollbars in your custom view.