Ser Pounce
Ser Pounce

Reputation: 14571

Can't get rid of inherited delegate method warning

I have a class ParentViewController that implements a UITapGestureRecognizer with the target method being called tap. I am trying to override this method in a subclass ChildViewController as follows:

- (void) tap:(UITapGestureRecognizer *)sender
{
    [super tap:sender];
}

It works fine, but I'm getting the warning:

'ChildViewController' may not respond to 'tap:'

In the past when I've overridden a delegate method I haven't really had any trouble like this. What am I missing here?

Upvotes: 1

Views: 87

Answers (1)

Andy Obusek
Andy Obusek

Reputation: 12842

Make sure -(void) tap:(UITapGestureRecognizer *)sender is defined in ParentViewController.h

Upvotes: 1

Related Questions