Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you find all references to a method or property in Xcode?

Tags:

xcode

If you have a method, e.g., loadMediaImages in a .h file, how do you find all references to that method in the project? In Visual Studio there is a "Find All References" option on the content menu when you highlight and click the method name. Anything similar in Xcode?

like image 842
ChrisP Avatar asked Jul 19 '11 17:07

ChrisP


People also ask

How do I see references in Xcode?

Find symbols in your source code To find a symbol in your code, Control-click the variable or function name, and choose Find > Find Selected Symbol in Workspace. Xcode displays the declaration of the symbol in the Find navigator, along with any places where your code references the symbol.

How to search files in Xcode?

In xcode on left pane in the project navigator at the bottom there is a search field. In the documentation it is called filter bar. According to Inder Kumar Rathore the shortcut is ⌘ + ⇧ + O .


1 Answers

Using the "Search Navigator" it's possible to search for symbol references within a project or workspace. Click on the little magnifying glass icon in the search box to "Show Find Options", and then select the Style: Symbol References.

Search Navigator with find options

Note: This is in Xcode 4.6, but may have been present in earlier versions.

like image 186
Anthony F Avatar answered Sep 29 '22 02:09

Anthony F