Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Defined Types

The principal types used in Objective-C are defined in objc/objc.h. They are:

Type

Definition

id

An object (a pointer to its data structure).

Class

A class object (a pointer to the class data structure).

SEL

A selector, a compiler-assigned code that identifies a method name.

IMP

A pointer to a method implementation that returns an id.

BOOL

A Boolean value, either YES or NO.

id can be used to type any kind of object, class, or instance. In addition, class names can be used as type names to statically type instances of a class. A statically typed instance is declared to be a pointer to its class or to any class it inherits from.

The objc.h header file also defines these useful terms:

Type

Definition

nil

A null object pointer, (id)0.

Nil

A null class pointer, (Class)0.

NO

A boolean false value, (BOOL)0.

YES

A boolean true value, (BOOL)1.



< Previous PageNext Page > Hide TOC


Last updated: 2008-02-05




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice