Editing storyboard in Xcode 5 is very slow

ε祈祈猫儿з 提交于 2019-12-09 11:34:52

问题


I have Xcode 5 and storyboard editing is very slow. Each time I start Xcode I get the message:

"The document "MainStoryboard.storyboard" had 26 internal inconsistencies that were found and repaired."

and

"Multiple resources have the same name: yellowbutton.png, etc. The preceding issues may have occurred due to an SCM operation such as merging."

Standard solutions as deleting the workspace file did not help. How can I solve this?

Thanks!


回答1:


I had a similar result when I added a segmented control inside a uitoolbar. It would crawl but only when Xcode was on my external monitor. What did the trick, oddly enough, is making sure the segment control style is set to Bar.




回答2:


I had the same issue. Whenever I opened the storyboard after the inconsistencies message was displayed, Xcode would consume 60%+ CPU and essentially make it unusable.

I (very slowly) found which images were being reported as problems, then deleted them through finder and restarted Xcode. You may also need to remove any references to these images in the storyboard.

Xcode now runs fine - hope it helps!




回答3:


Try removing all the layout constraints on the view. Storyboard was unusable due to performance until I did this. I'm trying to learn constraints and must have totally jacked them up.

Its under Editor - Resolve AutoLayout Issues - Clear All Constraints in View Controller"




回答4:


The thing that finally fixed it for me was to disable snapshots in each of the projects that was having performance problems.

File > Project Settings > Snapshots

Once I had disabled the snapshots, I also nuked all the snapshots. The total disk usage in my snapshots directory in a fairly short period of time was ~3GB.

The default directory for the snapshots to be stored in is :~/Library/Developer/Xcode/Snapshots.

Keep in mind that the snapshot setting is set for each project, so you will need to do this for each every project that you are having the performance issues.



来源:https://stackoverflow.com/questions/19270813/editing-storyboard-in-xcode-5-is-very-slow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!