Xcode 8 hangs / unresponsive when opening storyboard

前端 未结 16 1395
南方客
南方客 2021-01-31 17:48

I\'ve recently upgraded to Xcode 8 and updated my project to Swift 3. All worked fine for a little while. Storyboard loading has always been slow (even when still running Xcode

16条回答
  •  抹茶落季
    2021-01-31 18:05

    I finally figured out a fix, based in large part on the answers to this question. It finally came down to a stare-and-compare with the XML of a working storyboard, but here's a summary of the steps I took.

    • Reinstall Xcode 8.2.1 and reboot

    • Remove config, state, and data files

      rm -rf ~/Library/Developer/*
      rm -rf ~/Library/Caches/com.apple.dt.Xcode/*
      rm -rf ~/Library/Developer/Xcode/DerivedData/*
      rm -rf ApplicationName.xcodeproj/xcuserdata/
      rm -rf ApplicationName.xcworkspace/xcuserdata/
      rm -rf ~/Library/Saved\ Application\ State/com.apple.dt.Xcode.savedState/
      
    • Fix autolayout issues

    • Remove all dependencies from storyboard XML except:

      
          
          
          
      
      
    • Check all storyboards and xib files, ensuring that all "Top Bar" and "Bottom Bar" are set to "Inferred"

    The last two items seemed to be the most important.

提交回复
热议问题