How do I create a progress indicator as shown in swift for iOS? Tried various libraries. But nothing fits exactly.The color should be in gradient and the current state must show the step number.
Asked
Active
Viewed 4,754 times
-2
-
If you want to do this exactly how you want, you can create a subclass of `UIView` or `UIProgressView`, and make your own – Callam Jan 13 '19 at 13:00
-
Yes. I k now that. Just incase somebody has a solution to it (already done). Will save me a lot of time – Anup G Prasad Jan 13 '19 at 14:18
-
Show your sample efforts so people would join in. – E.Coms Jan 13 '19 at 14:47
-
You could create this in just a few hours, there is nothing complicated about it. – trndjc Jan 13 '19 at 16:29
2 Answers
2
If you want to create any custom control element You should inherits your class from UIControl. You can read about this here: custom knob, custom slider.
But You will have to write too many lines of code to create customize view.
However, You can use my turnkey solutions: https://github.com/vladislovshilov/StepView
Unfortunately this library does not support touch yet.

jMelvins
- 194
- 1
- 10
-
Hey Thanks @jMelvins. I don't need touch as if now. Guess this would work Let me try it – Anup G Prasad Jan 14 '19 at 04:38
-
-
-
If It helped you, can You please set my answer as correct. And star my lib on github. It is important for me, thank you! – jMelvins Jan 14 '19 at 14:01
-
-
-
Seems like the problem is on cocoapods. Try this: https://stackoverflow.com/questions/28844013/cocoapods-unable-to-find-a-specification-for-github-framework – jMelvins Jan 14 '19 at 15:27
0
Here is an example that uses a UIStackView, works nicely with auto layout, is animatable, and is configurable in Interface Builder. https://gist.github.com/Dev1an/aa54ae331f4065569dc613d7f904bd54

Damiaan Dufaux
- 4,427
- 1
- 22
- 33