iOS - Shortcut for jumping to definition in Xcode 9?

IosXcodeShortcutXcode9 Beta

Ios Problem Overview


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.

Ios Solutions


Solution 1 - Ios

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 - Ios

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 - Ios

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 - Ios

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

Solution 5 - Ios

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

Solution 6 - Ios

If dont like to use mouse click(I certainly don't like) you could use > Command + Ctrl + J

Solution 7 - Ios

In Xcode 9 both of these work:

⌘ + Right Click

OR

⌘⌃ + Click

Solution 8 - Ios

When I ⌘-click on a symbol in Xcode 9 I see

enter image description here

That means you have to ⌃⌘-click on the symbol to skip the popup.


Nevertheless there is even a keyboard shortcut:

enter image description here

Solution 9 - Ios

I don't know how Cmd + Option + Left Click worked for you guys, but the shortcut (at least for me) was Cmd + Ctrl + Left Click. I've tried on both Apple keyboard and MacBook keyboard and this is the one that did it.

Solution 10 - Ios

In Xcode 9 Beta, it has been changed to Cmd + Ctrl + Left Click.

Solution 11 - Ios

Solution to your question: Ctrl + ⌘ + Left click

> Xcode >> Preference >> Key Bindings >> Here is list of all short cuts > of Xcode.


enter image description here

Solution 12 - Ios

Deleting everything under the Derived data and re-opening Xcode fixed everything for me.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionBikram ThapaView Question on Stackoverflow
Solution 1 - Iosuser8315745View Answer on Stackoverflow
Solution 2 - IosGhulam RasoolView Answer on Stackoverflow
Solution 3 - IosdipView Answer on Stackoverflow
Solution 4 - IosParesh PatelView Answer on Stackoverflow
Solution 5 - IosAlexView Answer on Stackoverflow
Solution 6 - IosCodeNoobView Answer on Stackoverflow
Solution 7 - IosShaked SayagView Answer on Stackoverflow
Solution 8 - IosvadianView Answer on Stackoverflow
Solution 9 - IosMihai CostiugView Answer on Stackoverflow
Solution 10 - IosAshish VermaView Answer on Stackoverflow
Solution 11 - IosKrunalView Answer on Stackoverflow
Solution 12 - Iosuser9542776View Answer on Stackoverflow