Appendix D. Using XCode

XCode is a powerful IDE for Mac/iPhone development. In this appendix, we cover several topics related to using XCode. First, we show some useful shortcuts. Next, we talk about writing custom templates for your classes and after that we cover build configuration. Finally, we show you how to add references to other libraries (also known as frameworks).

XCode Shortcuts

The following are some of the common shortcuts in XCode:

  • Quick Open. To open a file quickly, use Command-Shift-D.

  • Build Project. To build your project, use Command-B.

  • Global Search. To search for something in your project, use Shift-Command-F.

  • Spelling and Grammar. To show spelling and grammar, use Command-:.

  • Shift Text. To shift text to the right, use Command-]. To shift to the left, use Command-[. Select a block to shift it. No selection is needed for a single line.

  • Message Bubbles. To show message bubbles, use Shift-Command-H. To hide message bubbles, use Option-Shift-Command-H.

  • Documentation. To open documentation on something (e.g., class), Option-Double-Click it. To show its declaration, Command-Double-Click it.

Creating Custom Templates

File templates are widely used in XCode. For example, to create a TableViewController, you choose File->New and select the TableViewController under the Cocoa Touch Class category. This is very helpful as you do not want to write all the necessary delegate and data source method signatures, etc.

In this section, you learn how easy it is to create your own templates. ...

Get iPhone SDK 3 Programming: Advanced Mobile Development for Apple iPhone and iPod touch now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.