Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Key Commands must all have a Title, Key and Selector

Tags:

ios

swift

beta

I am receiving and error when trying to build, Xcode 8.0 Beta 4, and when I'm building it says "error: Illegal Configuration: Key Commands must all have a Title, Key, and Selector. Select each row in the table to check its configuration."

It isn't on a TableView or anything, its a UIView with a Stack View inside it and some buttons, thats about it.

And this is on a Storyboard file I'm getting the error

I can't figure out what that might be?

like image 203
trever Avatar asked Aug 03 '16 18:08

trever


3 Answers

Open your storyboard file as source code (right click -> open as -> source code). There should be a line, <keyCommands> <keyCommand/> </keyCommands>. Removing this should solve your problem.

This line can be caused by accidentally clicking the + button in the key commands section of the view controller's attributes inspector, although it may be caused by other factors. The extra line can cause weird things to happen in XCode, such as errors and crashes.

like image 147
Hayden Holligan Avatar answered Nov 20 '22 16:11

Hayden Holligan


To do this with the xcode interface builder:

  1. Select your view controller

  2. Select attributes inspector

  3. Find "Key Commands" list at the bottom

  4. Select the keys within the list, such as: "Enter action below"

  5. Hit the minus button

This should fix the problem.

Example Image, Click Here

like image 28
CrazyOne Avatar answered Nov 20 '22 16:11

CrazyOne


I have a solution:

  1. Open storyboard as "source Code" (right click on storyboard -> open as -> source code).
  2. Delete this line: <keyCommands><keyCommand/></keyCommands>
  3. Run app.
like image 3
Himanshu Avatar answered Nov 20 '22 18:11

Himanshu