gizmosachin / ColorSlider

🎨 Snapchat-style color picker in Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How do I had some sort of marker ontop of the picker?

JordanRoPo opened this issue · comments

If i wanted to add a bar, so the user could visually see where they were pressing a bit more clearly, where in the code would I add this? i've tried adding it into the commoninit as well as the drawRect, however the UIView i attempt to place on top is never visible. Only if I add it in the VC where the colorSlider is instantiated, can I do this, but this feels like bad approach. I don't want it like the example, where a color preview circle appears outside of the bar.

Please see the implementation of the preview view in ColorSlider.swift for an example of how to add custom markers like you described.