Information Technology Reference
In-Depth Information
NOTE
OS X projects can also link code to the UI using bindings—indirect links between properties and UI elements. The
standard OS X templates don't include any bindings; if you want to use them, you have to add your own. Bindings
aren't available in iOS.
Using the OS X Application templates
Although there are only three OS X Application templates, all include extra options.
Using the Cocoa Application template
The Cocoa Application template includes the ingredients listed earlier. The two options are shown in Figure
3.9.
You can create a Document-Based Application, which is designed for multi-document applications. Each docu-
ment loads and creates an instance of the same nib file. The template uses Cocoa's NSDocument class to im-
plement the document's features. It includes extra set-up and tear-down features that aren't needed in an applic-
ation that uses a single window, but it isn't a full implementation of a complete document-based application.
You need to add file save/load features, recent file support, and undo code.
The Use Core Data option creates an application with support for Core Data storage. The code implements
automatic archiving and loading of the data, but it doesn't implement specific editing features. It also doesn't
define a data model. For a brief introduction to Core Data, see Appendix B.
FIGURE 3.9
Select a Cocoa Application template, and set the two options. The grayed-out Spotlight Importer option isn't avail-
able, and you can ignore it.
Search WWH ::




Custom Search