title: adding tap gesture to a tabBarController
body: <p>I have a question on how to add a tap gesture to a UITabBarController. As the UITabBarController already has tap gestures built-in (responding to the tapping of the tab bar items on the tab bar), while technically I can add my own gesture to the tabBarController, the tabBar loses its own native tap gesture. Below is what I am trying to do:</p>
  
  <pre><code>UIViewController *VC1 = ....;
  UIViewController *VC2 = ....;
  
  UITabBarController  *tabBarController = [[UITabBarController alloc] init];
  tabBarController.viewControllers = [NSArray arrayWithObjects: VC1, VC2, nil];
  UITapGestureRecognizer *tapGR = [[UITapGestureRecognizer alloc]
                                               initWithTarget:VC1
                                                          action:@selector(tap:)];
  
  
  
  
  [tabBarController.view addGestureRecognizer:tapGR];
  </code></pre>
  
  <p>This correctly responds to the tapping method "tap: ", but the tabBarController loses its native tapping responses to the tap bar items. I tried to add the gesture to one of the view controllers in the tabBarController like this:</p>
  
  <pre><code>[VC1.view addGestureRecognizer:tapGR];
  </code></pre>
  
  <p>but then doing it this way the tapping gesture is not recognized at all, although the tabBar's native tap recognition of the tapping on the tab bar items is retained.</p>
  
  <p>Does anyone has any suggestions on how to resolve this type of issues? I guess one way is to pick another gesture other than tapping to go with tabBarController, but I'd really rather not do that....</p>
  
  <p>Much thanks for viewing!</p>