I have created a button:
button = [StretchableButton new];
[button addTarget:mainViewController action:@selector(addNumberFromButton:) forControlEvents:UIControlEventTouchUpInside];
Inside the StretchableButton class I have:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
[self.nextResponder touchesBegan:touches withEvent:event];
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
[self.nextResponder touchesMoved:touches withEvent:event];
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
[self.nextResponder touchesEnded:touches withEvent:event];
}
Touch methods are called, but button does not react to clicks.
Can anybody help me?
Add gesture recognizer, code sample:
….