title: Changing back button in iOS 7 disables swipe to navigate back
body: <p>I have an iOS 7 app where I am setting a custom back button like this:</p>
  
  <pre><code>    UIImage *backButtonImage = [UIImage imageNamed:@"back-button"];
      UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom];
  
      [backButton setImage:backButtonImage forState:UIControlStateNormal];
      backButton.frame = CGRectMake(0, 0, 20, 20);
  
      [backButton addTarget:self
                     action:@selector(popViewController)
           forControlEvents:UIControlEventTouchUpInside];
  
      UIBarButtonItem *backBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:backButton];
      viewController.navigationItem.leftBarButtonItem = backBarButtonItem;
  </code></pre>
  
  <p>But this disables the iOS 7 "swipe left to right" gesture to navigate to the previous controller. Does anyone know how I can set a custom button and still keep this gesture enabled?</p>
  
  <p>EDIT:
  I tried to set the viewController.navigationItem.backBarButtonItem instead, but this doesn't seem to show my custom image.</p>