Illustration link: h ttps://drive.google.com/file/d/1xwrbqYs87wtksupbXHFI_vDXZ_OHvvKC/view?usp=sharing
Over the last couple of days, I have been working on a progress tracker class / UI (see link above for illustration) that will be used to keep customers updated on the status of their order. One of the problems I am trying to solve is how to update the progress tracker based on a response from the server. So far I have mapped it out to the following ( my illustration above actually has this mapped out in more detail, please take a look, I think it will help explain it clearly)
Essentially I have:
1. An image library array that stores the images for the different stages for the progress tracker
2. An UIColor array that stores the colors that the image can be (for example, the "Build" image can be green meaning the product has been manufactured, or yellow meaning the product in in manufacturing.
3. The progress tracker will be updated based on a respone from ther sever, so if the server sends back [0,1], the approriate image from the image array and the corresponding color will be applied to it and then the progress tracker would update with the image and color.
Again, my lllustration maps it out more visually and it has a method I am working on... I would appreciate any advice on how to make this work or even if I'm on the right track. I'm thinking about using a dictionary, I also research into using the Set collection type, but I dont know if that's the right approach.
Thanks!