iosswiftprogress-baruiprogressview

How to create a multi colour progress view with different values for each colour


I've tried different ways and other resources on how to create a progress bar with 3 different colours and show progress according the values provided from the server but i can't find anything. How can i create a progress bar like this one below. I want to show the progress according to the values i can get from the backend which can change for different users. Here is the example json. Green -> "Won", Red -> "Lost" and darkGray -> "undecided"

"condition": {
          "won": 2,
          "lost": 3,
          "undecided": 0
        }

enter image description here


Solution

  • you can use this framework to get the output

    https://github.com/minjoongkim/MJProgressView

    another related framework