In your method, call:
[super touchesBegan:touches withEvent:event]
So:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesBegan:touches withEvent:event]
//Your code
}
or:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
//Your code
[super touchesBegan:touches withEvent:event]
}
Do the same in touchEnded etc.
IMPORTANT:
Remember to call the method on the superclass
using super
when you override important and standard methods like those.
It's the same that you do when you call init on your subclass:
- (id)init {
self = [super init];
if(self) {
//your code
}
return self;
}