Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode - Find references to Swift variable

Tags:

xcode

swift

How can you find all references to a Swift class variable in Xcode?

The answers I've seen (such as the selected answer of Finding all references of a variable or a method in Xcode4) are only applicable to Objective C.

like image 551
Marcus Leon Avatar asked Feb 21 '16 22:02

Marcus Leon


2 Answers

Control-click on the symbol and click Find > Find Selected Symbol in Workspace.

like image 80
Edward Brey Avatar answered Sep 22 '22 17:09

Edward Brey


In Xcode you can find references of the variable Find >References >Matching in Find Navigator in Left Navigator But be careful it will give you all the references matching the variable name so you must to be careful with that, until now this feature not implemented in a good way to find the references like other IDE's.

This is the most efficient way you can do until now.

enter image description here

like image 43
Ali Omari Avatar answered Sep 21 '22 17:09

Ali Omari