Find method references in Xcode

  1. Select the method you’re interested in, or position the text cursor within it.
  2. Open the “Related Files” menu via the icon at the top-left of the Editor. (It’s the button immediately to the left of the back button).
  3. Go to the “Callers” submenu for a list of all methods that call the selected method, and click any of them to jump to that file and method.

In pictures…

Screenshot of steps 1 and 2 above.

Screenshot of step 3 above

A couple of notes:

  • You can do this for properties too.
  • Note that when you select a calling method from the Callers menu to jump to where your method was called, Xcode highlights only the first call. Each calling method will only show up in the ‘Callers’ list once, even if it contains many calls to your method. So if you’re trying to make some change at every place in your application where a method is called, be careful not to miss some in places where a calling method contains two calls to the method you’re interested in.

Leave a Comment