简体   繁体   中英

Xcode Folders Auto-Expanding When Clicking “Project Navigator”

Every time I re-open the Project Navigator tab in the left side of Xcode (IE 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 Key short cut).

Has anyone else experienced this?

Input any number of letters in the File filter, then close your Xcode immediately, then reopen your Xcode, then you will see the magic

Demo

在此输入图像描述

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

使用CocoaPods,删除此:

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

The solution is to click the square in the red circle. Maybe you accidentally clicked it without knowing that

XCode的屏幕截图

In my case @G.Car... and @Younes Rouabah answers did not work alone. But both done the trick

Step 1: Delete File

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

Step 2: Restart XCode

Step 4: Click the square in the red circle

在此输入图像描述

Restart XCode Again

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