Cocoa Programming for Mac OS X - Aaron Hillegass [1]
Challenge
Chapter 4 Memory Management
Living with Manual Reference Counting
Leak-Free Lottery
dealloc
Autoreleasing Objects
The Retain-Count Rules
Accessor Methods
Living with ARC
Strong References
Weak References
ARC Odds and Ends
Chapter 5 Target/Action
Some Commonly Used Subclasses of NSControl
NSButton
NSSlider
NSTextField
Start the SpeakLine Example
Lay Out the XIB File
Making Connections in Interface Builder
Implementing the SpeakLineAppDelegate Class
For the More Curious: Setting the Target Programmatically
Challenge
Debugging Hints
Chapter 6 Helper Objects
Delegates
The NSTableView and Its dataSource
SpeakLineAppDelegate Interface File
Lay Out the User Interface
Make Connections
Edit SpeakLineAppDelegate.m
Common Errors in Implementing a Delegate
Many Objects Have Delegates
For the More Curious: How Delegates Work
Challenge: Make a Delegate
Challenge: Make a Data Source
Chapter 7 Key-Value Coding and Key-Value Observing
Key-Value Coding
Bindings
Key-Value Observing
Making Keys Observable
Properties
Attributes of a Property
For the More Curious: Key Paths
For the More Curious: Key-Value Observing
Chapter 8 NSArrayController
Starting the RaiseMan Application
RMDocument.xib
Key-Value Coding and nil
Add Sorting
For the More Curious: Sorting without NSArrayController
Challenge 1
Challenge 2
Chapter 9 NSUndoManager
NSInvocation
How the NSUndoManager Works
Adding Undo to RaiseMan
Key-Value Coding and To-Many Relationships
Key-Value Observing
Undo for Edits
Begin Editing on Insert
For the More Curious: Windows and the Undo Manager
Chapter 10 Archiving
NSCoder and NSCoding
Encoding
Decoding
The Document Architecture
Info.plist and NSDocumentController
NSDocument
NSWindowController
Saving and NSKeyedArchiver
Loading and NSKeyedUnarchiver
Setting the Extension and Icon for the File Type
For the More Curious: Preventing Infinite Loops
For the More Curious: Creating a Protocol
For the More Curious: Automatic Document Saving
For the More Curious: Document-Based Applications without Undo
Universal Type Identifiers
Chapter 11 Basic Core Data
NSManagedObjectModel
Interface
View-Based Table Views
Connections and Bindings
How Core Data Works
For the More Curious: View-Based versus Cell-Based Table Views
Challenge
Chapter 12 NIB Files and NSWindowController
NSPanel
Adding a Panel to the Application
Setting Up the Menu Item
AppController.m
Preferences.xib
PreferenceController.m
For the More Curious: NSBundle
Challenge
Chapter 13 User Defaults
NSDictionary and NSMutableDictionary
NSDictionary
NSMutableDictionary
NSUserDefaults
Precedence of Types of Defaults
Setting Defaults
The Identifier for the Application
Create Keys for the Names of the Defaults
Register Defaults
Letting the User Edit the Defaults
Using the Defaults
Suppressing the Creation of Untitled Documents
Setting the Background Color on the Table View
For the More Curious: NSUserDefaultsController
For the More Curious: Reading and Writing Defaults from the Command Line
Challenge
Chapter 14 Using Notifications
What Notifications Are and Are Not
What Notifications Are Not
NSNotification
NSNotificationCenter
Posting a Notification
Registering as an Observer
Handling the Notification When It Arrives
The userInfo Dictionary
For the More Curious: Delegates and Notifications
Challenge
Chapter 15 Using Alert Panels
Make the User Confirm the Deletion
Challenge
Chapter 16 Localization
Localizing a NIB File
String Tables
Creating String Tables
Using the String