You can start by centering the image vertically using a progress view using constraints or programmatically, as shown below.
imageView.center.y = progressView.center.y
Then, when you update the progress, you can calculate the center x coordinate for the image using the adjusted progress and the width of the progress view.
imageView.center.x = progressView.progress * progressView.frame.width
Although you may need to add a registration if the super view of the progress view does not have the same width.
OR
You can use UISlider ; it comes with a progress tracking track and thumb slider that you can customize. Thus, you can even have user interaction if necessary - otherwise user interaction can be turned off, and you can set the progress programmatically.
source share