Research, Dev, Share

Become Master of Xcode

Posted in Iphone, Learning, Objective-C, Software Development by Khang Vo on August 26, 2010

For iPhone development guys (and Mac as well), we all want to be as productive as possible. And one of our important tools is Xcode. I can even say that if we can master of Xcode, we can double our productivity. The reason is not only the time that the tool can save us but the number of times it breaks our workflow, or make us become bored/tired of our jobs. We are all humans, and no human in the world wants to do the job that a machine can do. Ok, stop talking and I will show you my summary of tips/tricks and techniques that I feel very very useful for me.

Many of these tips is from this stackoverflow post (I just list what I feel is most productive), 2 famous videos called “Becoming productive in XCode”, and a famous cheat sheet that almost all of us know “Complete Xcode Keyboard Shortcut List

I also recommend you to go there and take a look because this post may be really personal and lack excellent tips that you want.

1/ Basic Hot Keys

File Cursor Movement

  • Header/Source File Switching: Option + Command + Up Arrow
  • Last cursor point switch back and forward: Option + Command + Left (Right) Arrow


Quick Help/Documentation

  • Jump to Definition of a symbol : Command + Double-Click on a symbol
  • Find Text in Documentation of a symbol: Option + Double-Click on a symbol: (Only works if you have they symbol’s Doc Set installed.)


Auto Complete

  • (previous) next auto-completion argument : (Shift) + Control + /
  • Auto completion pop-up list : Escape or Control + comma
  • (previous) next Auto completion choices movement: (Shift) + Control + period


Text Movement:

  • Cursor movement between words : Option + Left (Right) Arrow
  • Cursor movement camel-cased parts of a word: Control + Left (Right) Arrow
  • Beginning or end of line: Command + Left (Right) Arrow


Interface Builder:

  • Jump to class in Xcode : Command + Double-click on an object in Interface Builder’s
  • Drag a customized object back to Interface Builder’s Library for later reuse.
  • Object overlap, see object menu under mouse: Control + Shift + Click on an object :


Code Organizing:

  • Bold line in the function list: #pragma mark Foo
  • Auto complete the pragma: pm or #p
  • Notation convention: // TODO: or // FixMe
  • Commenting a line: Command + /


2/ Advanced Hot Keys

With advanced hot keys, you will rarely need to use the mouse. Because, everything you need to do with the mouse, you can do it with the hot keys.

  • Open File Quickly : Command + Shift + D and don’t forget that open quickly uses the current word as a search term.
  • Popup list of methods and symbols in the current file : Control + 2
  • Look up current symbol:  Control + Command + ?
  • Editor area to full screen : Command + Shift + E
  • Debug and Editor Mode switch in All-In-One XCode mode : Command + Shift + B


3/ Some useful scripting

I will tell you more about scripting in the next part, but currently, I think this list is basic enough:

Default Auto Completion list, show when you type

defaults write com.apple.Xcode XCCodeSenseAutoSuggestionStyle List

Turn Off Undo Warning

defaults write com.apple.Xcode XCShowUndoPastSaveWarning NO

Advertisements

4 Responses

Subscribe to comments with RSS.

  1. Khang Vo said, on January 31, 2011 at 10:55 am

    what do you mean? Do you intend to say something?

  2. […] you are just a newbie, it is not easy to solve. You may also want to take a look at my first part: Become Master of XCode Many of the techniques are learnt from “Becoming productive in […]

  3. Benito III said, on September 25, 2010 at 8:44 pm

    Fabulous post! Loved reading your great post, I always can tag it

  4. Marie Chelle said, on September 16, 2010 at 10:31 am

    Thank you very much my friend, you are very kind in sharing this useful information with? others…. The details were such a blessing, thanks.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: