I'm working with objective-c and I want to detect when the user is tapping a button (not when he tapped it, but the actual moment when is being taped until he stops). Is there any method? I'm not finding it if there's any. Thanks
Using touchDown event you can make an action while your button is pressed

Example
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var label: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBAction func testing(_ sender: Any) {
label.textColor = UIColor.red
}
@IBAction func testingCancel(_ sender: Any) {
label.textColor = UIColor.black
}
@IBAction func testingUpInside(_ sender: Any) {
label.textColor = UIColor.black
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With