title: IB Designables: Failed to update auto layout status: The agent raised a "CALayerInvalidGeometry" exception
body: <p>After I add <code>@IBDesignable</code> to a view controller,</p>
  
  <pre><code>import UIKit
  
  @IBDesignable
  class IvCalcViewController: UIViewController {
    // ...
  }
  </code></pre>
  
  <p>the following error shows up in Xcode 7.2 (7C68):</p>
  
  <blockquote>
    <p>file:///.../Base.lproj/Main.storyboard: error: IB Designables: Failed
    to update auto layout status: The agent raised a
    "CALayerInvalidGeometry" exception: CALayer position contains NaN:
    [207 nan]</p>
  </blockquote>
  
  <p>I can still run the app in Simulator when the error is there. </p>
  
  <p><a href="https://i.stack.imgur.com/VxCYm.png" rel="noreferrer"><img src="https://i.stack.imgur.com/VxCYm.png" alt="enter image description here"></a></p>
  
  <p>When I click on the error, Xcode jumps to the ViewController in StoryBoard but does not highlight what's wrong. </p>
  
  <p>How can I clear the error?</p>
  
  <p>p.s. I have removed all auto-layout constrains from the StoryBoard already...</p>
  
  <p>Update: one way to clear the error:</p>
  
  <ul>
  <li>remove all <code>@IBDesignable</code> from the source</li>
  <li>close the project</li>
  <li>re-open the project</li>
  </ul>
  
  <p>So the question becomes: are there some minimum auto-layout requirements to meet when using <code>@IBDesignable</code>?</p>