krishonadish
krishonadish

Reputation: 1019

How do I find usages of an Objective-C function in Xcode?

The title pretty much sums it up, normally in an IDE like Eclipse or Intellij, you can highlight/right-click on a method and click on option like "Find Usages", but I don't see an equivalent option in Xcode.

Upvotes: 20

Views: 14617

Answers (2)

JoshRagem
JoshRagem

Reputation: 595

EDIT: after reading your question again, I think you are looking for these answers: Find method references in Xcode

The answer by Francisco Garcia shows advanced search options that you can find by clicking the little magnifying glass in the search tab.

You can check for symbol references; this would list all the calls you have to a method.

----------- old answer ------------

If you hold down option and click on something, you can see some helpful hints and a link to documentation.

If you click on something that you have defined, it is helpful enought to link you to the file you declared it in.

Upvotes: 8

GeneralMike
GeneralMike

Reputation: 3001

I think you're looking for the Quick Help Inspector. Make sure you have the Utilities Panel open (the toolbar that shows up on the right side of the screen). Mouseover the tabs along the top of the panel, and one of them will say "Show Quick Help Inspector". Click on that one, then highlight the method you are interested in, and the panel will display some of the basic information you are looking for.

If that doesn't tell you what you are looking for, you can also search in the Apple docs for your method name, but sometimes that can be hard to understand if you're totally new to developing on a Mac.

I usually just do a Google search on the method name. That usually produces links to a bunch of other SO questions with a ton of explanations from other users in everyday terms that are much easier to understand for new users.

Upvotes: -1

Related Questions