title: iOS 7 Back Button Pop Gesture
body: <p>In iOS 7 there's the new swipe to pop gesture: You swipe from left to right on the left side of your screen and the <em>UINavigationController</em> pops back to the previous <em>UIViewController</em>. </p>
  
  <p>When I create a custom back button like this, the swipe to pop gestures doesn't work anymore:</p>
  
  <pre><code>UIBarButtonItem *customBackButton = [[UIBarButtonItem alloc] initWithTitle:@" " style:UIBarButtonItemStyleBordered target:self action:@selector(navigateBack)];
  [customBackButton setBackButtonBackgroundImage:barBackBtnImg forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
  [customBackButton setBackButtonBackgroundImage:barBackBtnImgHighlighted forBarMetrics:UIBarMetricsDefault];
  self.navigationItem.backBarButtonItem = customBackButton;
  </code></pre>
  
  <p>How can I use a custom back button and have the native swipe to pop gesture?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>That's what's happening in <em>navigateBack</em>:</p>
  
  <pre><code>- (void)navigateBack {
      [self.navigationController popViewControllerAnimated:YES];
  }
  </code></pre>