Xcode 右窗格(实用程序窗格)不适用?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/30259861/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 07:09:24  来源:igfitidea点击:

Xcode right pane (utilities pane) not applicable?

xcodestoryboardutilities

提问by Allister Bah

I was programming using Swift in Xcode, halfway through when I wanted to edit a button using the utilities pane, I realised it became "Not Applicable". Attributes inspector, Connections inspector, etc all became "Not Applicable", only the Quick Help inspector still shows.

我在 Xcode 中使用 Swift 进行编程,中途当我想使用实用程序窗格编辑按钮时,我意识到它变成了“不适用”。属性检查器、连接检查器等都变成了“不适用”,只有快速帮助检查器仍然显示。

I have selected the button in the Storyboard.

我选择了故事板中的按钮。

Can anybody help with this?

有人可以帮忙吗?

Attached are screenshots.. Attributes inspector not showing

附上截图。。 属性检查器未显示

Connections inspector not showing

连接检查器未显示

Only Quick Help inspector shows

仅快速帮助检查器显示

回答by milczi

Storyboard can't be opened at the start.

故事板在开始时无法打开。

  1. Open any file (like AppDelegate) but not storyboard.
  2. Then close Xcode.
  3. Open xcode again.
  1. 打开任何文件(如 AppDelegate)但不打开故事板。
  2. 然后关闭Xcode。
  3. 再次打开xcode。

Works in Xcode 7.2

适用于 Xcode 7.2

回答by A C

It also happened to me, I fixed it by deleting the derived data. Go to Window > Projects, select the project, and delete the derived data

它也发生在我身上,我通过删除派生数据来修复它。转到 Window > Projects,选择项目,然后删除派生数据

回答by Jignesh Fadadu

Storyboard -> Viewcontroller -> Control -> (Identity / Attributes / Size / Connections' Inspector) window not works then follow below steps.

Storyboard -> Viewcontroller -> Control -> (Identity / Attributes / Size / Connections' Inspector) 窗口不起作用,然后按照以下步骤操作。

1. Open any file (like AppDelegate) but not storyboard.
2. Then close xcode.
3. Open xcode again.

Works fine in Almost all updated version of Xcode.

在几乎所有更新版本的 Xcode 中都可以正常工作。

回答by ARSHWIN DENUEV LAL

Yes it is a bug in xcode I have tried cleaning my project, reopened xcode, even changed my derived data location but nothing worked.

是的,这是 xcode 中的一个错误,我尝试清理我的项目,重新打开 xcode,甚至更改了我的派生数据位置,但没有任何效果。

The only thing we have to do is close all the storyboards but should not close xcode. Select any swift file. Then choose the storyboard again. Now you will be able to access the all the things in utilities.

我们唯一要做的就是关闭所有的故事板,但不应该关闭 xcode。选择任何 swift 文件。然后再次选择故事板。现在您将能够访问实用程序中的所有内容。

回答by Ramis

In my case was not helping to clean Derived Data. I noticed that I have had opened storyboard in two tabs. So closed active one and opened inactive did the trick for me.

就我而言,它无助于清理派生数据。我注意到我在两个选项卡中打开了故事板。所以关闭活动的并打开非活动对我来说是成功的。

It was with the xCode 7.2.

这是与 xCode 7.2。

回答by Vladimir Grigorov

First of all, try deleting DerivedData, as mentioned above.

首先,尝试删除 DerivedData,如上所述。

If it doesn't help, open the storyboard or xib file by locating it in the Project Navigator tree. When I use the shortcut Cmd+ Shift+ o(Open Quickly dialog) to open the storyboard, then I see Not Applicable in Utiilties pane.

如果没有帮助,请通过在项目导航器树中找到故事板或 xib 文件来打开它。当我使用快捷方式Cmd+ Shift+ o(快速打开对话框)打开故事板时,我在 Utilities 窗格中看到 Not Applicable。

回答by Lance Hall

There's no bug. Just make sure to select the View Controller in the storyboard file. If none is selected, then those tabs should in fact be "not applicable". If you have multiple View Controllers in one storyboard file, then swift won't know which you want to modify.

没有错误。只需确保在故事板文件中选择视图控制器。如果没有选择,那么这些选项卡实际上应该是“不适用的”。如果您在一个故事板文件中有多个视图控制器,那么 swift 将不知道您要修改哪个。

回答by Jeehut

tl;dr:Try selecting the Base localizedStoryboard file instead of the normal file.

tl;dr:尝试选择Base 本地化的Storyboard 文件而不是普通文件。



I was having this issue recently with Xcode 9.2. None of the other tips worked for me. One of my colleagues told me this solutionwhich worked:

我最近在Xcode 9.2 上遇到了这个问题。其他提示都不适合我。我的一位同事告诉我这个有效的解决方案

The Storyboardfile in my case was localized. What I just had to do was insteadof using the "Settings.storyboard" I had to open up the localized files by clicking the "?" Symbol on the left and then choosing the "Settings.storyboard (Base)"file. This fixed it.

我的故事板文件是本地化的。我所要做的不是使用“Settings.storyboard” ,而是通过单击“?”打开本地化文件。左边的符号然后选择“Settings.storyboard (Base)”文件。这修复了它。

Of course, this solution will only apply to your if your Storyboard/XIB file is localized.

当然,如果您的 Storyboard/XIB 文件已本地化,则此解决方案仅适用于您。

回答by JaneGoodall

Since none of the other answers worked in XCode 9.3, I just edited the XML directly by adding the identifier="foobar"attribute to <segue>element:

由于其他答案都不适用于 XCode 9.3,我只是通过将identifier="foobar"属性添加到<segue>元素来直接编辑 XML :

1) Right click the storyboard and mouse over Open As >, then click Source Code.

1) 右键单击​​情节提要并将鼠标悬停在 Open As > 上,然后单击Source Code

2) ?Ffor segue, then add an identifier(not to be confused with an id) so that this:

2)?F对于segue,然后添加一个identifier(不要与 an 混淆id),以便:

<segue destination="BYZ-38-t0r" kind="show" id="QBP-0i-mUm"/>

becomes this:

变成这样:

<segue destination="BYZ-38-t0r" kind="show" identifier="foobar" id="QBP-0i-mUm"/>


This might be unfeasible if you have a lot of segues since it's hard to tell which one is which. For Tab Bar Controllers, they seem to be ordered from left to right.

如果您有很多 segue,这可能是不可行的,因为很难分辨哪个是哪个。对于标签栏控制器,它们似乎是从左到右排列的。

回答by Nidhi Dhorajiya

Please make sure that you are editing in Main.Storyboardnot in Main. Storyboard.Base.

请确保您在Main.Storyboard 中而不是在 Main 中进行编辑故事板.Base

because source file does not allow edit change in identity inspector it will work.

因为源文件不允许在身份检查器中进行编辑更改,所以它会起作用。

1)open project navigator

1) 打开项目导航器

2)select Main.storyboard file

2)选择Main.storyboard文件

it was worked for me..try it!

它对我有用..试试吧!