Kodeco Forums

How To Make a Custom Control Tutorial: A Reusable Knob

Custom UI controls are extremely useful when you need some new functionality in your app — especially when they’re generic enough to be reusable in other apps. This custom control tutorial covers the creation of a control kind of like a circular slider inspired by a control knob, such as those found on a mixer.

This is a companion discussion topic for the original entry at https://www.raywenderlich.com/5294-how-to-make-a-custom-control-tutorial-a-reusable-knob

Suggestion: Slider does not currently update when “Random Value” is clicked, this should be added to the tutorial or as a DIY suggestion at the end.

@lorenzoboaro Do you have any feedback regarding this? Thank you - much appreciated! :]

Hi @alekplay!

Thank you very much for your question.

I’ve checked the Final project and it seems to work as expected: when I tap “Random value”, the slider updates accordingly.
I will go through the tutorial again in order to see I’ve missed the step in order to link the slider’s update when the button is tapped.
Did you create the project start to finish? Are you able to share some code (especially ViewController one)?

Thanks, Lorenzo

Thank you for this tutorial.
It helped and inspired me to make my own circular slider. It took a while but I got there in the end.
I’m sure the code can be improved a lot. I hope you can take a look and give me your opinion.


Again thank u for enabling me.

Hi @ouraigua! Thanks for your reply.

I’m happy to ear our tutorial inspired you. I’ve looked into the code and it seems very well organized. Thanks for sharing your work!

What I will change is the name of color1, color2, etc. to make them more clear for the consumer.

Hope it helps,

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!