简体   繁体   中英

XCode 13: Storyboard very slow when edited

I've just cloned a repo from GitHub into my Xcode project and for some reason after a few minutes, my storyboard became incredibly unresponsive and slow.

I am running a MacBook Pro with an i9 , 16 GB ram, and the AMD Raedon Pro 5500M (I have tried disabling integrated graphics)

Everything I have seen online tells me to delete xcuserdata and xcshared data but I cannot do this as I am working on a project which uses source control and server-side building and from what I've read doing this breaks the source control.

Here's what I have tried:

  • Disabling integrated graphics
  • Re-cloning
  • Refactoring views into their own storyboard.

Any help is appreciated as I'm very fed up with this.

Unfortunately if you can't get rid of xcuserdata and xcshared you are a bit limited. I would still try and delete them to see if it helps speed up these (you can always revert). If they are to blame at least you know who to blame for your problems.

Other than that I can recommend to look for things that slow down storyboards. Like @IBDesignables which were invented by a demon.

Also, do you have many view controllers in your storyboard. A good practice is to have only one controller per storyboard to limit these side effects. (or none at all if you want to live long and healthy). You can refactor these out of your main storyboard to try and locate what is slowing it down. And additionally refactor custom views out of it into full code classes.

Wish I could be of more help.

1.Check iCloud storage and status if your project in iCloud shared Documents

2.Break the storyboard into small storyboards

3.Remove hardcoded large size image on storyboard

4.Update Xcode

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM