Code Completion and Snippets
You probably fumbled a bit as you filled in all this code. Cocoa Touch is a huge API, and nobody remembers every symbol and method name. NSString
has more than 130 methods in its basic interface. If you don’t have a crib, you might be pausing to look up spellings all the time. Here is where you turn on another feature I had you turn off in the “Quieting Xcode Down” section of Chapter 2, “Kicking the Tires.”
Open the Preferences window (Xcode → Preferences. . . , comma), and turn to the Editing tab of the Text Editing panel. Check Suggest completions while typing.
Now try the line labelName = [prop stringByAppendingString: ...
Get Xcode 5 Start to Finish: iOS and OS X Development 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.