Xcode记住折叠/打开了哪些文件夹 [英] Xcode remember what folders were collapsed / opened

查看:321
本文介绍了Xcode记住折叠/打开了哪些文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个很大的iOS项目,其中包含许多文件夹/组。退出并重新启动Xcode时, Project Navigator 中的所有文件夹都显示为展开状态,因此我必须手动折叠其中的大多数文件夹。

I have a big iOS-project with many folders / groups. When I quit and restart Xcode, all folders in the Project Navigator are shown expanded, so I have to collapse most of them manually.

是是否可以保存 Project Navigator 的状态,以便在Xcode重新启动时像以前一样折叠/展开相同的文件夹?

Is it possible to save the state of the Project Navigator, so that when Xcode restarts the same folders are collapsed / expanded as before?

推荐答案

解决方案是删除此文件:

The solution was to delete this file:

MyProjectName.xcodeproj > project.xcworkspace > xcuserdata > myusername.xcuserdatad > UserInterfaceState.xcuserstate

此文件是XCode在重新打开项目时重新创建的。

This file was recreated by XCode when re-opening the project.

显然,当XCode崩溃时,该文件已损坏。
(其大小为300 KB,而不是通常的10 KB)。

Apparently that file got corrupted when XCode crashed. (Its size was 300 KB instead of the usual 10 KB).

要查看文件,请右键单击 MyProjectName.xcodeproj ,然后选择显示包内容。您会在子文件中找到 UserInterfaceState.xcuserstate

To see the files right click on MyProjectName.xcodeproj, and choose Show Package Contents. You will find UserInterfaceState.xcuserstatein the subfiles.

这篇关于Xcode记住折叠/打开了哪些文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆