Just in case, someone has a different problem. Here is how I solved it:
Created a UIProgressView with a default value of 0. Then, using a timer called a method (progressup), which updates the move to +0.05, if it is 1, if it is equal to one, then the timer stops and a new timer that calls the method (progressdown), which updates the move to -0.05, if it is not equal to <0.05, if it is less than 0.05, the timer is stopped and a new timer starts, which calls the method (progressup) and so on, and so on on the panel up and down.
Then, when another button is pressed, it reads the current move and stops the timer.