I haven't found a very easy way to do this. The ways I've seen require all these timers and stuff. Is there any easy way I can hold a UIButton and cause it to repeat the action over and over until it gets released?
Cocoa-touch – UIButton Touch and Hold
cocoa-touchuibutton
Best Answer
You can do the following: Make an NSTimer that will start up when the app starts or in viewDidLoad and also make a boolean.
For example:
Now in your implementation file (.m):
Now make an IBAction for "Touch Down" set the boolean to lets say true. Then make another IBAction button for "Touch Up Inside" and "Touch Up Outside" assign the boolean to false.
For example:
Then in that NSTimer method, put the following:(assume g is the boolean you have declared)
I hope this simplifies everything... I know it still uses a timer but there is not another way.