title: Can't get constraints right in iOS8 custom keyboard
body: <p>I'm having major problems with auto layout in iOS 8. I'm working on a custom keyboard, but I can not get the view to display at the correct height. The rendered view on the device comes out too low, more like the intended height of the UIImageView alone. I've set the constraints as shown in the image:</p>
  
  <p><img src="https://i.stack.imgur.com/LsLjV.png" alt="XCode Screenshot"></p>
  
  <p>But I keep getting this error in the log, that tells me nothing (probably because I don't understand where to look):</p>
  
  <pre><code>2014-12-06 19:56:45.095 [40268:12181198] Unable to simultaneously satisfy constraints.
  Probably at least one of the constraints in the following list is one you don't want. Try this:(1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) 
  (
      "&lt;NSLayoutConstraint:0x600000096940 V:[UIInputView:0x7fe780d3f600(246)]&gt;",
      "&lt;NSLayoutConstraint:0x600000097390 'UIView-Encapsulated-Layout-Height' V:[UIInputView:0x7fe780d3f600(0)]&gt;"
  )
  
  Will attempt to recover by breaking constraint 
  &lt;NSLayoutConstraint:0x600000096940 V:[UIInputView:0x7fe780d3f600(246)]&gt;
  
  Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
  The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in &lt;UIKit/UIView.h&gt; may also be helpful.
  </code></pre>
  
  <p>I've tried following the code in <a href="https://stackoverflow.com/questions/24167909/ios-8-custom-keyboard-changing-the-height">iOS 8 Custom Keyboard: Changing the Height</a>, but it still wont work.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I'm setting my height constraint using the following function:</p>
  
  <pre><code>override func updateViewConstraints() {
      super.updateViewConstraints()
      // Add custom view sizing constraints here
      let changeToOrientation = deviceInfoService.getOrientationForView(self.inputView)
  
      if (changeToOrientation == Orientation.Portrait) {
          self._heightConstraint!.constant = 246
          self.inputView.addConstraint(self._heightConstraint!)
      } else {
          self._heightConstraint!.constant = 192
          self.inputView.addConstraint(self._heightConstraint!)
      }
  }
  </code></pre>