View Programming Guide for Cocoa
PDF
Introduction
What Are Views?
The Role of NSView
Cocoa-Provided View Classes
Container Views
The Text System
Controls
Non-Quartz Graphic Environments
View Geometry
The View Coordinate System
Understanding a View's Frame and Bounds
Transforming the Coordinate System
Working with the View Hierarchy
What Is a View Hierarchy?
Benefits of a View Hierarchy
Locating Views in the View Hierarchy
Adding and Removing Views from a Hierarchy
Repositioning and Resizing Views
Moving and Resizing Views Programmatically
Autoresizing of Subviews
Notifications
Hiding Views
Converting Coordinates in the View Hierarchy
View Tags
Creating a Custom View
Allocating the View
Initializing View Instances Created in Interface Builder
Drawing View Content
Implementing the drawRect: Method
Marking a View as Needing Display
View Opacity
Responding to User Events and Actions
Becoming First Responder
Handling Mouse Click and Dragging Events
Tracking Mouse Movements
Handling Key Events in a View
Handling Action Methods via the Responder Chain
Property Accessor Methods
Deallocating the View
Advanced Custom View Tasks
Determining the Output Device
Drawing Outside of drawRect:
Optimizing View Drawing
Avoid the Overuse of Views
Specify View Opacity
Invalidating Portions of Your View
Constraining Drawing to Improve Performance
Suppressing Default Clipping
Drawing During Live Window Resizing
Draw Minimally
Cocoa Live Resize Notifications
Preserve Window Content
Revision History
Related Reference
Objective-C
NSResponder
NSView
Related Documents
Cocoa Fundamentals Guide
Cocoa Event-Handling Guide
Drag and Drop Programming Topics for Cocoa
Printing Programming Topics for Cocoa
Cocoa Drawing Guide