Search code examples
iosxcodeinterface-buildermacos-high-sierra

Xcode 9.0.1 Interface Builder 100% CPU opening iOS Storyboard


Last night Xcode automatically updated to Version 9.0.1 (9A1004). Today, I tried to open an existing project and my iOS storyboard file gets stuck with a never ending spinner and Activity Monitor reports Interface Builder using 100% CPU. I have a second MacBook Pro that still has Xcode 9.0.0 and it opens the storyboard without any issue. I'm running macOS High Sierra on both. Anyone else seen this or know of a workaround.


Solution

  • I received a response from my bug report with a suggested workaround. The suggestion was to edit the storyboard text and change the value for the translatesAutoresizingMaskIntoConstraints attribute from NO to YES in the applicable toolbar tags in the storyboard.

    From:

    <toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill"
     fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="KCx-9L-amg">
    

    To:

    <toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill"
     fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="YES" id="KCx-9L-amg">
    

    I have two storyboard files in my project and this does solve the problem with both of them.