键盘命令必须都有标题、键和选择器
Key Commands must all have a Title, Key and Selector
我在尝试构建时收到错误,Xcode 8.0 Beta 4,当我构建时它说 "error: Illegal Configuration: Key Commands must all have a Title, Key, and Selector. Select each row in the table to check its configuration."
它不在 TableView 或其他任何东西上,它是一个 UIView,里面有一个 Stack View 和一些按钮,仅此而已。
这是在 Storyboard 文件上,我收到了错误
我不知道那可能是什么?
将故事板文件作为源代码打开(右键单击 -> 打开方式 -> 源代码)。应该有一行,<keyCommands> <keyCommand/> </keyCommands>
。删除它应该可以解决您的问题。
这条线可能是由于不小心单击了视图控制器属性检查器的键命令部分中的 + 按钮引起的,尽管也可能是由其他因素引起的。额外的行可能会导致 XCode 中发生奇怪的事情,例如错误和崩溃。
我有解决办法:
- 以 "source Code" 方式打开故事板(右键单击故事板 -> 打开方式 -> 源代码)。
- 删除这一行:
<keyCommands><keyCommand/></keyCommands>
- 运行 应用
要使用 xcode 界面生成器执行此操作:
Select 你的视图控制器
Select 属性检查器
在底部找到 "Key Commands" 列表
Select 列表中的键,如:"Enter action below"
点击减号按钮
这应该可以解决问题。
Example Image, Click Here
我在尝试构建时收到错误,Xcode 8.0 Beta 4,当我构建时它说 "error: Illegal Configuration: Key Commands must all have a Title, Key, and Selector. Select each row in the table to check its configuration."
它不在 TableView 或其他任何东西上,它是一个 UIView,里面有一个 Stack View 和一些按钮,仅此而已。
这是在 Storyboard 文件上,我收到了错误
我不知道那可能是什么?
将故事板文件作为源代码打开(右键单击 -> 打开方式 -> 源代码)。应该有一行,<keyCommands> <keyCommand/> </keyCommands>
。删除它应该可以解决您的问题。
这条线可能是由于不小心单击了视图控制器属性检查器的键命令部分中的 + 按钮引起的,尽管也可能是由其他因素引起的。额外的行可能会导致 XCode 中发生奇怪的事情,例如错误和崩溃。
我有解决办法:
- 以 "source Code" 方式打开故事板(右键单击故事板 -> 打开方式 -> 源代码)。
- 删除这一行:
<keyCommands><keyCommand/></keyCommands>
- 运行 应用
要使用 xcode 界面生成器执行此操作:
Select 你的视图控制器
Select 属性检查器
在底部找到 "Key Commands" 列表
Select 列表中的键,如:"Enter action below"
点击减号按钮
这应该可以解决问题。
Example Image, Click Here