In Xcode, how can I find all caller functions of a specific function?
Join them; it only takes a minute:
|
|
Xcode 4.5 (in beta) has this functionality. when you highlight say... a function, you can check the "caller" and "callee" edit i believe it's located at the top left of the file panel for that file... so double click on the function to highlight it, and you click on on the file panel options (the one that has the "open recent, open unsaved...etc" drop down EDIT #2 here's a picture to clarify (since i dont know what this menu button is called) ALSO - XCode 4.5 is no longer beta, i believe, and is actually out in public EDIT #3 also note that this caller thing does NOT search for being called under the
|
|||||||||
|
|
In XCode 4.5, the quickest method is this:
This is the shortcut for going View->Standard Editor->Show Related Items in XCode's title menu. |
|||||||||||||
|
|
This can also be accessed via the assistant editor, as shown in the screenshot below. Whichever method you have the insertion point in in the main editor on the left will have its callers displayed in the assistant editor. I've found this to be the best way of looking through each caller in succession, since once you have "Callers" selected, you can then select the next caller via the next pop-up menu to the right in the jump bar.
|
|||||||||
|
|
In Xcode-7 you have the functionality of getting call-heirerchy. Right-click on the function and click "Find Call Hierarchy": image reference: |
|||||
|
|
use ⌘+Ctrl+Shift+H key combination on XCode 7 onwards. |
|||||
|
|
Use Find in Project as Text or as Symbol. AFAIK, there's no equivalent to e.g. Call Hierarchy known from Eclipse or NetBeans. |
|||||
|
|
Strangely the refactoring tool can detect all method calls but not the search. So I simply use it to rename my method to a unique name (eg. reset to resetPlayer) and then use the new name in a regular textual search. 1.) Menu > Edit > Refactor... > Rename to unique name 2.) search for the new name |
|||||
|
|
The functionality is available in XCode 4.4.1, see this: http://smilingfinney.blogspot.de/2012/09/method-callers-in-xcode-44.html |
|||
|
|
: