sparkFinder sparkFinder - 1 month ago 14
iOS Question

What's a good way to mark iOS UISlider with indicators for certain milestones

I'm creating an app that has a slider at the bottom of a view for a set of chapters and want to mark the chapters on the UISlider - so that the user can see where the milestones in the app are. I don't see any way to customize the slider itself to do this, was thinking of some UIView overlay that could help me add little marks here in the right spots on the slider. Any suggestions? More questions are welcome.


Try this hierarchy:

UIView containing
UIImageView containing

You can make the UISlider background clear so you can see the UIImageView. The UIImageView can then be a resource png that looks however you want.

Alternatively, and this isn't exactly what you asked for, you can update the thumb image to reflect the current chapter. Then as the user drags (or as the slider updates programmatically) you can show whatever image you want.