单击“项目导航器”时 Xcode 文件夹自动展开
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37951746/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode Folders Auto-Expanding When Clicking "Project Navigator"
提问by Logan
Every time I re-open the Project Navigator tab in the left side of Xcode (I.E move away from it into another tab and come back to it), my folders and subfolders all "magically" expand on their own. I can't seem to figure out what the problem is. It's getting really frustrating collapsing them on my own every time (even with the option-Arrow Keyshort cut).
每次我重新打开 Xcode 左侧的 Project Navigator 选项卡(IE 从它移到另一个选项卡并返回到它)时,我的文件夹和子文件夹都“神奇地”自行扩展。我似乎无法弄清楚问题是什么。每次都让我自己折叠它们真的很令人沮丧(即使有选项 -箭头键快捷方式)。
Has anyone else experienced this?
有没有其他人经历过这种情况?
回答by Lixiang
回答by G. Car...
I found a solution for this from another posted question.
我从另一个发布的问题中找到了解决方案。
Delete this file...
删除这个文件...
MyProjectName.xcodeproj > project.xcworkspace > xcuserdata > myusername.xcuserdatad > UserInterfaceState.xcuserstate
Xcode remember what folders were collapsed / opened
I also had a similar issue with the search filter for an asset catalog failing to clear. Deleting the .xcuserstate file solved that as well
我也有一个类似的问题,资产目录的搜索过滤器无法清除。删除 .xcuserstate 文件也解决了这个问题
回答by Dmitry Isaev
With CocoaPods, delete this:
使用 CocoaPods,删除这个:
MyProjectName.xcworkspace > xcuserdata > myusername.xcuserdatad > UserInterfaceState.xcuserstate
回答by Younes Rouabah
The solution is to click the square in the red circle. Maybe you accidentally clicked it without knowing that
解决方法是单击红色圆圈中的方块。也许你不知道它不小心点击了它
回答by Mujahid Latif
In my case @G.Car... and @Younes Rouabah answers did not work alone. But both done the trick
就我而言,@G.Car... 和 @Younes Rouabah 的答案并不能单独解决。但两者都成功了
Step 1: Delete File
第 1 步:删除文件
MyProjectName.xcodeproj > project.xcworkspace > xcuserdata > myusername.xcuserdatad > UserInterfaceState.xcuserstate
Step 2: Restart XCode
第 2 步:重新启动 XCode
Step 4: Click the square in the red circle
第 4 步:单击红色圆圈中的方块
Restart XCode Again
再次重启 XCode