I am currently working on an application for a client, and they have made an odd request. The request involves putting a custom image as the indicator for the scrollview. I am not even sure if this is possible but if it is can you please let me know how one would go about doing that.
Thanks
UIScrollViewstreches a small, semi-transparent circle image to generate its scrollbars. You can find this image as the first subview of aUIScrollView: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
UIViewon top of aUIScrollView. Then you can hide the default scroll bar (by usingshowsHorizontalScrollIndicatorandshowsVerticalScrollIndicator), pass the necessary touch events to theUIScrollViewto scroll the content, and draw the scrollbars in your custom view.