Cocoa Programming for Mac OS X - Aaron Hillegass [2]
For the More Curious: ibtool
For the More Curious: Explicit Ordering of Tokens in Format Strings
Chapter 17 Custom Views
The View Hierarchy
Get a View to Draw Itself
Create an Instance of a View Subclass
Size Inspector
drawRect
Drawing with NSBezierPath
NSScrollView
Creating Views Programmatically
For the More Curious: Cells
For the More Curious: isFlipped
Challenge
Chapter 18 Images and Mouse Events
NSResponder
NSEvent
Getting Mouse Events
Using NSOpenPanel
Change the XIB File
Edit the Code
Composite an Image onto Your View
The View’s Coordinate System
Autoscrolling
For the More Curious: NSImage
Challenge
Chapter 19 Keyboard Events
NSResponder
NSEvent
Create a New Project with a Custom View
Lay Out the Interface
Make Connections
Write the Code
For the More Curious: Rollovers
The Fuzzy Blue Box
Chapter 20 Drawing Text with Attributes
NSFont
NSAttributedString
Drawing Strings and Attributed Strings
Making Letters Appear
Getting Your View to Generate PDF Data
For the More Curious: NSFontManager
Challenge 1
Challenge 2
Chapter 21 Pasteboards and Nil-Targeted Actions
NSPasteboard
Add Cut, Copy, and Paste to BigLetterView
Nil-Targeted Actions
Looking at the XIB File
For the More Curious: Which Object Sends the Action Message?
For the More Curious: UTIs and the Pasteboard
Custom UTIs
For the More Curious: Lazy Copying
Challenge 1
Challenge 2
Chapter 22 Categories
Add a Method to NSString
For the More Curious: Declaring Private Methods
Chapter 23 Drag-and-Drop
Make BigLetterView a Drag Source
Starting a Drag
After the Drop
Make BigLetterView a Drag Destination
registerForDraggedTypes:
Add Highlighting
Implement the Dragging Destination Methods
Add a Second BigLetterView
For the More Curious: Operation Mask
Chapter 24 NSTimer
Lay Out the Interface
Make Connections
Add Code to TutorController
For the More Curious: NSRunLoop
Challenge
Chapter 25 Sheets
Adding a Sheet
Add Outlets and Actions
Lay Out the Interface
Add Code
For the More Curious: contextInfo
For the More Curious: Modal Windows
Chapter 26 Creating NSFormatters
A Basic Formatter
Create ColorFormatter.h
Edit the XIB File
NSColorList
Searching Strings for Substrings
Implement the Basic Formatter Methods
The Delegate of the NSControl Class
Checking Partial Strings
Formatters That Return Attributed Strings
For the More Curious: NSValueTransformer
Chapter 27 Printing
Dealing with Pagination
For the More Curious: Are you Drawing to the Screen?
Challenge
Chapter 28 Web Services
RanchForecast Project
NSURLConnection
Add XML Parsing to ScheduleFetcher
Lay Out the Interface
Write Controller Code
Opening URLs
Challenge: Add a WebView
Chapter 29 Blocks
Block Syntax
Memory and Objects within Blocks
Availability of Blocks
RanchForecast: Going Asynchronous
Receiving the Asynchronous Response
Challenge: Design a Delegate
Chapter 30 Developing for iOS
Porting RanchForecast to iOS
ScheduleFetcher
RootViewController
Add a Navigation Controller
ScheduleViewController
UITableViewController
Pushing View Controllers
Challenge
Chapter 31 View Swapping
Get Started
Create the ManagedViewController Class
Create ViewControllers and their XIB files
Add View Swapping to MyDocument
Resizing the Window
Chapter 32 Core Data Relationships
Edit the Model
Create Custom NSManagedObject Classes
Employee
Department
Lay Out the Interface
EmployeeView.xib
Events and nextResponder
Chapter 33 Core Animation
Scattered
Implicit Animation and Actions
More on CALayer