Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword or section
Like this
1Activity

Table Of Contents

Who Should Read This Document
Organization of This Document
Introduction
Conventions
See Also
The Runtime System
Memory Management
Objects
Object Basics
id
Dynamic Typing
Object Messaging
Message Syntax
Sending Messages to nil
The Receiver’s Instance Variables
Polymorphism
Dynamic Binding
Dynamic Method Resolution
Dot Syntax
Listing1-1 Accessing properties using dot syntax
Listing1-2 Accessing properties using bracket syntax
Classes
Inheritance
Figure1-1 Some drawing program classes
Figure1-2 Rectangle instance variables
Class Types
Class Objects
Figure1-3 The inheritance hierarchy for NSCell
Listing1-3 Implementation of the initialize method
Class Names in Source Code
Testing Class Equality
Source Files
Class Interface
Importing the Interface
Referring to Other Classes
The Role of the Interface
Class Implementation
Referring to Instance Variables
The Scope of Instance Variables
Figure2-1 The scope of instance variables (@package scope not shown)
Messages to self and super
An Example: Using self and super
Using super
Redefining self
Allocating and Initializing Objects
The Returned Object
Implementing an Initializer
Constraints and Conventions
Handling Initialization Failure
Coordinating Classes
Figure3-1 Incorporating an inherited initialization method
Figure3-2 Covering an inherited initialization method
The Designated Initializer
Figure3-3 Covering the designated initializer
Protocols
Methods for Others to Implement
Declaring Interfaces for Anonymous Objects
Nonhierarchical Similarities
Formal Protocols
Declaring a Protocol
Optional Protocol Methods
Type Checking
Protocols Within Protocols
Referring to Other Protocols
Overview
Property Declaration and Implementation
Declared Properties
Property Declaration
Listing5-1 Declaring a simple property
Property Declaration Attributes
Property Implementation Directives
Listing5-3 Using @dynamic with NSManagedObject
Using Properties
Supported Types
Property Redeclaration
Copy
dealloc
Core Foundation
Example: Declaring Properties and Synthesizing Accessors
Listing5-4 Declaring properties for a class
Subclassing with Properties
Performance and Threading
Runtime Difference
Adding Methods to Classes
Categories and Extensions
How You Can Use Categories
Categories of the Root Class
Extensions
Adding Storage Outside a Class Definition
Creating Associations
Listing7-1 Establishing an association between an array and a string
Associative References
Retrieving Associated Objects
Breaking Associations
Complete Example
The for…in Syntax
Adopting Fast Enumeration
Fast Enumeration
Using Fast Enumeration
Default Dynamic Behavior
Static Typing
Return and Parameter Types
Static Typing to an Inherited Class
SEL and @selector
Selectors
Methods and Selectors
Method Return and Parameter Types
Varying the Message at Runtime
The Target-Action Design Pattern
Avoiding Messaging Errors
Enabling Exception-Handling
Exception Handling
Catching Different Types of Exception
Throwing Exceptions
Listing12-1 Locking a method using self
Listing12-2 Locking a method using a custom semaphore
Threading
Document Revision History
Glossary
0 of .
Results for:
No results containing your search query
P. 1
ObjC

ObjC

Ratings: (0)|Views: 1,934|Likes:
Published by Grant R. Emmel

More info:

Published by: Grant R. Emmel on Oct 07, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

10/07/2011

pdf

text

original

You're Reading a Free Preview
Pages 4 to 56 are not shown in this preview.
You're Reading a Free Preview
Pages 60 to 62 are not shown in this preview.
You're Reading a Free Preview
Pages 66 to 116 are not shown in this preview.

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->