-2

enter image description here

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.

Anup G Prasad
  • 246
  • 2
  • 4
  • 14

2 Answers2

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
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