Xcode 8 hangs / unresponsive when opening storyboard

前端 未结 16 1398
南方客
南方客 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:17
    1. open a Finder window and navigate to your project
    2. right-click on the .xcodeproj file (it’s a package actually)
    3. select Show Package Contents
    4. a new window appears
    5. delete a folder called xcuserdata
    6. restart your mac
    0 讨论(0)
  • 2021-01-31 18:18

    Delete your derived data from /Users/{username}/Library/Developer/Xcode/DerivedData

    (You can get exact path from) File -> Project Setting: or File -> Workspace Settings

    0 讨论(0)
  • 2021-01-31 18:19

    (Xcode 9.2) I had this happen right after I added a constraint to a stackview. No matter what I did, it didn't seem to fix it. I knew it had to be an auto-layout issue it couldn't resolve.

    I ended up opening the Main.storyboard file in text editor and deleting the scene that was causing the issue. It will start with

        <!—YourViewControllerName—>
        <scene sceneID=“XXX-XXX-XXX”>
    

    and end with </scene>. Just highlight the entire chunk, delete, save, and try again.

    Much better than starting over from scratch!

    0 讨论(0)
  • 2021-01-31 18:21

    Until Apple fixes IB, in first XML line (<document> tag) of the offending .xib:

    useTraitCollections="NO"
    
    0 讨论(0)
  • 2021-01-31 18:24

    After deleting all sorts of things listed above, and restarting Xcode. The solution was to reboot the computer. Dumb I know, but somehow a resource was tied up in IB.

    0 讨论(0)
  • 2021-01-31 18:26

    I got the same problem using Xcode 9.2, fixed it by removing the stack view which wrapped up other views, I just removed the stackview and its subview tags and kept other views in the scene.

    0 讨论(0)
提交回复
热议问题