`
xhanxhanxhan
  • 浏览: 208721 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

Tips For Using Xcode

阅读更多

VIA http://www.mobileorchard.com/14-essential-xcode-tips-tricks-and-resources-for-iphone-devs/

 

 

Xcode is big. Apple’s Xcode Workspace Guide, a terse inventory of its features, is 116 pages. Xcode’s preference window has 13 sections, each with a dozen or more items. There are at least 206 keyboard shortcuts. I started counting menu items but gave up the ghost when I’d topped 300 items before finishing the third section.

Cutting Through The Clutter

We’ve collected a set of tips, resources, how-tos, tutorials and links ranging from newbie-to-expert to help you wring the maximum amount of productivity out of Xcode:

[Note: Apple changed their link-structure, so all of the links to Apple's documentation are now broken. Anyone know of a "permalink" like approach to pointing to Apple documentation so I can fix this once and not have to redo again and again? Email dan@mobileorchard.com ]

Workspace Tweaks

All-in-One Window Layout from Apple’s Xcode Workspace Guide - For many, Xcode’s default layout feels like a sea of windows. Xcode’s All-in-one layout , accessible under Preferences… > General , “provides a single project window in which you can perform all the tasks necessary for software development.” A Condensed layout style is also available.

split editorSplit Editor from Apple’s Xcode Workspace Guide - Miss multi-panel editing from your last editor? I’m looking at you, vim and emacs. Split the editor horizontally by clicking the split button (located on the top-right of the editor pane) or with the keyboard shortcut command-”. Split the editor vertically with by prefixing the preceding with the Option key. Close either with close .

Cocoa Programming for Mac OS X by Aaron Hillegass (Profile ) suggests turning on Syntax-aware indenting under Preferences… > Indenting and always showing the console when running an app under Preferences… > Debugging > On Start: Show Console .

Keyboard and Mouse Shortcuts

The Xcode Tips & Tricks thread on Stack Overflow features, among other things, these Essential Keyboard and Mouse Shortcuts :

  1. Option-Command-Up: toggle betweeen .m and .h files
  2. Code completion: press tab to accept the current suggestion
  3. Command-double-click: jump to the .h definition of the symbol under the mouse
  4. Option-double-click: open the documentation for the symbol under the mouse
  5. Command-shift-D: open file quickly (similar to Command-t in TextMate)

Jeff Nouwen (Profile ) reported , “After discovering ⌘⇧E [which hides the details panel above the editor panel] and remembering ^1 [which brings up a quick jump to recent files], the All-In-One layout in Xcode is starting to really grow on me. Viva keyboard shortcuts!”

Colin Wheeler (Profile ) has compiled a comprehensive list of a mind-boggling 206 Keyboard Shortcuts in PDF and PNG format.

Text Macros

55 C and ObjC Text Macros with Completion Prefixes from Apple’s Xcode Workspace Guide - Type the letter-a then escape and expand it to [[(class) alloc] init]. Type aa-escape for an array. 53 others to choose from.

Custom TextMate-Like Macros by Dylan Bruzenak (Profile ) is a step-by-step tutorial to add your own macros and, if you prefer, make them more TextMate like.

Custom Project and File Templates

Custom Project Templates by Dylan Bruzenak (Profile ) - Find yourself repeating the same configuration setup every time you create a new project? Create your own project template.

Similarly, Dylan has a post on Custom File Templates that demonstrates how to create new templates that will show up under New File menus.

User Scripts

User Scripts in Apple’s Xcode Workspace Guide - Perform programmatic manipulation of (selected) text in files.

Instance variable to synthesized property (an Xcode user script) by Matt Gallagher (Profile ) - Xcode User Scripts aren’t intended to work on multiple files. In this post, Matt demonstrates scripting changes to both header and implementation files.

Xcode and Git

Shane Vitarana (Profile ) shows how to create a .gitignore file for Xcode projects.

Marcus Zarra (Profile ) wrote about making Git automatically inject the build number into the application bundle .

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics