Chapter 20. Ten Tips to Make Cocoa Programming Easier
In This Chapter
Use keyboard shortcuts
Read the documentation
Use Class Browser
Adjust the window count
Use drag and drop
Use
init
andawakeFromNib
Don't forget the methods of the superclass
Position items with Cocoa coordinates
Use guidelines in Interface Builder
Reuse code
As you familiarize yourself with Objective-C and the Cocoa frameworks, you're bound to run across various tips and tricks that you'll want to remember. This chapter attempts to reduce the amount of time you have to wait until you discover some of those tips and tricks.
Use Keyboard Shortcuts
One of the easiest ways to speed up your Cocoa programming is to take advantage of the multitude of keyboard shortcuts available to you in Xcode and Interface Builder. Table 20-1 lists some of the common keyboard shortcuts that Xcode and Interface Builder share.
Table 20.1. Keyboard Shortcuts Shared by Xcode and Interface Builder
Shortcut | What It Does |
---|---|
Saves a file | |
Opens a file | |
Minimizes a window to the Dock | |
Displays help for Xcode or Interface Builder | |
Creates a new file in Xcode or a new NIB file ... |
Get Cocoa® Programming for Mac OS® X For Dummies® 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.