Xcode Interface Builder is showing “No selection”

2019-02-07 17:16发布

No matter what I've got selected in Interface Builder, the Inspector did apparently not register the selection and only showed "No selection".

I tried opening and closing files, restarting Xcode and even rebooting my Mac. No change! What the heck is going on?

Other projects work just fine. It's just this project...

9条回答
Anthone
2楼-- · 2019-02-07 17:46

There is also possibility in Xcode 7.3.1. to switch between "Standard editor" and "Assistant editor" in the upper right corner to "deal" with this bug.

Click between first two icons

查看更多
爱情/是我丢掉的垃圾
3楼-- · 2019-02-07 17:48

This was driving me crazy for a long time. I found nothing here on Stackoverflow about this, and not by googling either, initially.

Luckily, after googling a couple of different ways, I finally found the simple solution here.

Snipped from that site:

Here’s how you can fix it in two steps without even having to restart Xcode:

  • Select another file (which isn’t an Interface Builder type) in the current tab with the issue.
  • Open a new tab and select the Interface Builder file which was having the problem.

Shame on you, Apple!

查看更多
不美不萌又怎样
4楼-- · 2019-02-07 17:48

P.S.: For each of them who has tried all the above options like me: (try this also)

  1. Switch to the LaunchScreen.storyboard from your Main.storyboard

  2. See if you can access all the Inspectors on right side in LaunchScreen.storyboard .

if yes,

  1. Switch back to Main.storyboard

This worked for me! Hope that also help to someone. Thanks!

查看更多
看我几分像从前
5楼-- · 2019-02-07 17:52

The bug is weird. And all answers didn't help me. The following steps were useful for me:

  • go to project file.
  • Click on the button near "Launch Images Source"

After that Xcode shows assets in the proper way.

查看更多
聊天终结者
6楼-- · 2019-02-07 17:52

For me the bug was caused by missing interface restoration. I think it happens when I open the project file where the Assets editor was open last time. If I close the tab which containts the Assets editor, quit Xcode then open the project again, works fine.

查看更多
劳资没心,怎么记你
7楼-- · 2019-02-07 17:53

In XCode 8.3, the preferred solution doesn't appear to work. My solution, similar to travdu, was to click the "Show the version editor" button (the two arrows pointing left and right), then back to the "Show the Standard editor". Doing that fixed it for me.

查看更多
登录 后发表回答