title: Constraint a UIBarButtonItem's size in the navigaiton bar with iOS 11
body: <p>I try to set UIBarButtonItem with different size images in the navigation bar. So I create a UIBarButtonItem based custom view and set the custom view's frame to constraint the UIBarButtonItem's width. It had been working well before I updated the software to iOS 11. That set custom view's frame to constraint the UIBarButtonItem's width seems no longer useful on iOS 11.</p>
  
  <p>I used the image <code>defaultImage</code> with 120*120:</p>
  
  <pre><code>UIButton *leftCustomButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 35, 35)];
  
  [leftCustomButton setImage:[UIImage imageNamed:@"defaultImage"] forState:UIControlStateNormal];
  
  UIBarButtonItem * leftButtonItem =[[UIBarButtonItem alloc] initWithCustomView:leftCustomButton];
  
  self.navigationItem.leftBarButtonItems = @[self.headerIconItem];
  </code></pre>
  
  <p>On iOS10, iOS9 the leftBarButtonItem's image is not stretched. It show's like:</p>
  
  <p><a href="https://i.stack.imgur.com/89FTj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/89FTj.png" alt="show on iOS 10"></a></p>
  
  <p>But the leftBarButtonItem's image is stretched on iOS11. It show's in the picture below. </p>
  
  <p><a href="https://i.stack.imgur.com/63iXj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/63iXj.png" alt="show on iOS 11"></a></p>
  
  <p>Is there have some ways to constraint UIBarButtonItem's width in the navigation bar on iOS 11?</p>