Help manage iphone

Hi, I am creating a game in which there are two actions that allow the button, the first time I touch the button, I need the "power" panel to scroll up and down, and then the second time I touch the "power" bar the scroll stops and another action occurs.

I got to the scene where the button is tangible, but has no idea what you call the "power" bar control to find help on how to create it.

The “power” bar is like your traditional game control, such as a sports game, where you need to set the “strength” of the golf, based on when you press the button.

If

  • You know the name of this type of control so that I can search in more detail -or-
  • You have an example code that will show how you can achieve this "power" Then it would be gratefully appreciated
+3
source share
2 answers

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.

0

All Articles