Reputation: 51374
What are the must know shortcuts in Xcode for faster application development?
As a special interest, the Mac shortcut I want to know is the one to open application menus (File, Edit, View, Project, Build etc.,). In Windows, if we type Alt + F, the File menu will drop down, and we can navigate through the sub-menus using the arrow keys or typing the letters that are underlined in the menus. How can we do something like that in Mac?
Thanks..
Upvotes: 4
Views: 3763
Reputation: 1486
Click on any method name in the Xcode. Then use ALT + CMD + / to insert comments describing the input and return parameters. This will encourage you to write descriptive comments explaining what is the method supposed to do, thus leading to a more maintainable code.
Upvotes: 1
Reputation: 51374
Alt
+ Cmd
+ Up
to toggle between .h
and .m
files of a classCmd
+ '
to move to next error or warningCmd
+ Shift
+ '
to move to previous error or warning Upvotes: 2
Reputation: 2860
Use CMD + SHIFT + O
to open the Open Quickly Dialog. While you type classes, methods and files will appear matching your entered description. Pressing enter will go to said method, class or file. This greatly improved productivity for me.
Upvotes: 0
Reputation: 155
"Alt + Cmd + Up to toggle between .h and .m files of a class"
This seems to have been disabled in Xcode 4. I've not been able to find a way to set it in Bindings, either. Any hints?
Update: Just found it. It has been changed to "Ctrl + Cmd + Up". It can also be executed with a three finger swipe up or down.
The command, by the way, is called "Jump to Next Counterpart". I knew that.... :-/
Sometimes it takes a Ph.D. in linguistics to figure computer terminology out. And I've been doing this since the early 80s.
Upvotes: 1
Reputation: 41831
Shift-Command-D (Xcode 3.2) / Shift-Command-O (Xcode 4): Open quickly. Great way to get to the file you want.
Upvotes: 1
Reputation: 22958
These shortcuts are for Xcode 3.2.x (they may vary from Xcode 3.1.x and other versions):
Command-double click
on symbol/method name in source code editor > Open the .h file for symbol
Option-double click
on symbol/method name in source code editor > Open the documentation for symbol
Command-Option-Shift-F
> Find Selected Text in Project
(custom shortcut)
I have the following one setup in User Scripts under Code to insert a standard logging call:
The inserted text is:
NSLog(@"[%@ %@]", NSStringFromClass([self class]), NSStringFromSelector(_cmd));
Upvotes: 1
Reputation: 39925
Control-. to select the next autocompletion, control-/ to select the next placeholder (add shift for previous), control-escape to show autocompletion list.
As a response to your request, if you have full keyboard access turned on, control-fn-F2 will select the menu bar. Then use the arrows to select an item, and space to choose it.
Upvotes: 1
Reputation: 181460
For debugging:
Building & Running:
Upvotes: 3