 <p>addGestureRecognizer is a method on UIView, not UIViewController.</p> <p>Try </p> <pre><code> [self.view addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(isTapped:)]]; </code></pre>