Xcode tips and tricks — fast method finding

Apple, Cocoa, General

Inside of Xcode, I’ll want to quickly go to a method implementation. If you hit Cmd-F and do a find for the method name (or the start of it), you will frequently get hits for calls of the method instead of just the implementation.

There is a quick way to find the implementation: Hit Cmd-F and type: “)methodName”.

The left paren will match only the implementation (provided you don’t put a space after it…which you shouldn’t do anyways).

I picked up this little tidbit by watching Troy Stephens code around. Thanks Troy!

Tags:


Subscribe
Notify of
guest

6 Comments
Inline Feedbacks
View all comments
Daniel Jalkut

provided you don’t put a space after it…which you shouldn’t do anyways

Hmm… no accounting for taste :)

I. Savant

It’s interesting to see this mentioned – since my earliest days of using text editors, little tricks like this are how I’ve survived. :-) People are usually amazed to see me blazing through any type of structured text document … “How do you do that so fast?!” and I always try to tell them things like this, if you think them through first, usually work well. In the case of not putting a space, it would still work however your style looks, provided you’re consistent. :-)

ken

Hey Corbin,

You aware of the control-2 keyboard shortcut in Xcode? It moves focus to the function popup, from which you can use type-select.

Daniel Jalkut

Very cool – I didn’t know about that shortcut, either. For what it’s worth, the shortcut is modifiable through Xcode preferences. Under “Text Key Bindings” it’s called “Pop Symbols PopUp.”

Subscribe to new posts:

You'll get an email whenever a I publish a new post to my blog and nothing more. -- Corbin

As an Amazon Associate I earn from qualifying purchases.

(c) 2008-2024 Corbin Dunn

Privacy Policy

Subscribe to RSS feeds for entries.

73 queries. 0.244 seconds.

Log in