Xcode记住哪些文件夹是折叠/打开的

时间:2023-01-22 20:07:56

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.

我有一个大型的ios项目,有许多文件夹/组。当我退出并重新启动Xcode时,Project Navigator中的所有文件夹都显示为展开的,因此我必须手动折叠它们中的大部分。

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

是否可以保存项目导航器的状态,以便当Xcode重新启动时,与以前一样折叠/展开相同的文件夹?

1 个解决方案

#1


27  

The solution was to delete this file:

解决办法是删除这个文件:

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

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

XCode在重新打开项目时重新创建了这个文件。

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

很明显,当XCode崩溃时,这个文件被破坏了。(它的大小是300kb而不是通常的10kb)。

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

要查看文件,右键单击MyProjectName。xcodeproj,并选择Show Package Contents。你会发现UserInterfaceState。xcuserstatein子文件。

#1


27  

The solution was to delete this file:

解决办法是删除这个文件:

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

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

XCode在重新打开项目时重新创建了这个文件。

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

很明显,当XCode崩溃时,这个文件被破坏了。(它的大小是300kb而不是通常的10kb)。

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

要查看文件,右键单击MyProjectName。xcodeproj,并选择Show Package Contents。你会发现UserInterfaceState。xcuserstatein子文件。