Closed ibhavin closed 4 years ago
I have changed in GMStepper.swift
file:
@objc @IBInspectable public var buttonTapped = ""
@objc func leftButtonTouchDown(button: UIButton) {
self.buttonTapped = "Minus"
.
.
.
}
@objc func rightButtonTouchDown(button: UIButton) {
self.buttonTapped = "Plus"
.
.
.
}
@objc func buttonTouchUp(button: UIButton) {
self.buttonTapped = ""
reset()
}
In your action:
@IBAction func stepper_Item_Tapped(_ sender: GMStepper) {
if sender.buttonTapped == "Minus" {
print("Minus Button Tapped")
} else sender.buttonTapped == "Plus" {
print("Plus Button Tapped")
}
}
After adding this code clean and run your project. This is not correct way but this small workaround. Hope @gmertk will update repo with nice solution
Is there any way by which can we know that which button tapped Plus(+) or Minus(-). I want to perform specific action when user tapped Minus(-). I have made action of stepper like this: