iOS - Shortcut for jumping to definition in Xcode 9?

In previous Xcode version , I could jump to definition with simple Cmd + click on that method/variable . But in Xcode 9, I feel uncomfortable to jump to definition .

Does anyone has a better solution for jumping to definition in Xcode 9 ?

I am tired of selecting options from dropdown list.


Solution 1:

Ashish and Ghulam's answers were great but it still kinda bugged me that things had changed and I couldn't jump to definition as before. Then I found this...

Xcode9Beta2-Preferences->Navigation->Command-click on Code:->Jump To Definition:

Xcode9Beta2-Preferences->Navigation->Command-click on Code:->Jump To Definition

Solution 2:

Solution 1:

  • Go to Xcode menu
  • Click on Preferences
  • Select Navigation Tab from Top
  • Select Command-click on Code
  • Change to "Jumps to Definition"

As you can see in this screenshot

Solution 2: Use

Ctrl + ⌘ + Left click

Solution 3:

There is short cut displayed on drop down menu, just use-

1. Control, Command and left mouse button

OR

2. Command plus Right Mouse Click

instead of command left mouse button.

Solution 4:

In Xcode 9 Beta, you can go definition by Cmd + Right Click

Solution 5:

Standard hot key for jump to definition is ctrl+cmd+j. Set cursor to the class/method you are interested in and press this buttons to switch to declaration. Also you can try to press ctrl+opt+cmd+j. In this case definition will be opened in assistant editor