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 .

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值