title: iOS11 customize navigation bar height
body: <p>First of all, thank you for coming here and help solving my problem. Thank you!!!</p>
  
  <p>In iOS11 beta6, <code>sizeThatFits:</code> seems to not work on UINavigationBar. I notice that UINavigationBar structure has changed by Reveal my app.</p>
  
  <p>I have tried my best to change custom navigation bar's height. But it seems always to be <code>44</code>, and it works before iOS11. </p>
  
  <pre><code>- (CGSize)sizeThatFits:(CGSize)size {
      CGSize newSize = CGSizeMake(self.frame.size.width, 64);
      return newSize;
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Iwb6f.png" alt="enter image description here"></p>
  
  <p>Oddly, I just log its frame in <code>didMoveToSuperview</code> method, its height is 64, but I really see that is 44 in Reveal and app.</p>
  
  <p>I have no idea about this... Help me please.. Thank you.</p>
  
  <h1>Update:</h1>
  
  <p>I found that about my custom navigation bar LayoutConstraints log in console like this : </p>
  
  <pre><code>"&lt;NSAutoresizingMaskLayoutConstraint:0x604000495ae0 FDCustomNavigationBar:0x7fe2f01399d0.(null) == 42&gt;",
  "&lt;NSAutoresizingMaskLayoutConstraint:0x604000495b30 FDCustomNavigationBar:0x7fe2f01399d0.height == 44&gt;"`
  </code></pre>
  
  <p>bug I even no use auto layout in my navigation bar. What's wrong with it?</p>
  
  <h1>Update 8/28 :</h1>
  
  <p><img src="https://i.stack.imgur.com/144ew.png" alt="enter image description here"></p>
  
  <p>I have set my custom navigation bar's subviews frame at navigation bar's <code>-
   layoutSubviews</code>method. </p>
  
  <pre><code>- (void)layoutSubviews {
      [super layoutSubviews];
  
      self.frame = CGRectMake(0, 0, CGRectGetWidth(self.frame), 64);
  
      for (UIView *view in self.subviews) {
  
          if([NSStringFromClass([view class]) containsString:@"Background"]) {
              view.frame = self.bounds;
          } else if ([NSStringFromClass([view class]) containsString:@"ContentView"]) {
              CGRect frame = view.frame;
              frame.origin.y = 20;
              frame.size.height = self.bounds.size.height - frame.origin.y;
              view.frame = frame;
          }
      }
  }
  </code></pre>
  
  <p>but the navigation bar will cover view controller's view. How can I fix that?</p>