title: UINavigationItem's click area reduced in ios 11
body: <p><a href="https://i.stack.imgur.com/0br96.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0br96.png" alt="enter image description here"></a></p>
  
  <p>In ios 10 the clickable area on UINavigationBar was pretty much the area of the rectangle but in ios 11 it takes only the size of the image. Below is the code.</p>
  
  <pre><code>UIBarButtonItem *fixedSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
  [fixedSpace setWidth:-5];
  
  UIImage *buttonImage = [UIImage imageNamed:@"close-button.png"];
  
  UIButton *closeButton = [UIButton buttonWithType:UIButtonTypeCustom];
  
  [closeButton setBackgroundImage:buttonImage forState:UIControlStateNormal];
  
  closeButton.frame = CGRectMake(0.0, 0.0, buttonImage.size.width,   buttonImage.size.height);
  
  UIBarButtonItem *aBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:closeButton];
  
  [closeButton addTarget:navTarget action:@selector(didSelectCloseButton:) forControlEvents:UIControlEventTouchUpInside];
  
  [navItem setLeftBarButtonItems:[NSArray arrayWithObjects:fixedSpace,aBarButtonItem,nil]];
  </code></pre>
  
  <p>I am sure there might be something wrong with the code but in Xcode 8 and ios 10 its working fine but not in ios 11. Thanks in Advance.</p>