tags:

views:

1163

answers:

2

Does anyone know exactly what the @package directive is used for in Objective-C?

The only mention I could find of it in Programming in Objective-C 2.0 by Stephen Kochan was:

@package - For 64 bit images, the instance variable can be accessed anywhere within the image that implements the class

...

What? Is this restricted to being used with images, as in pictures? Or does it mean images as in disk images?

It's a confusing description, and doesn't elaborate whatsoever throughout the rest of the book....

Any help would be awesome, thanks!

+5  A: 

@package is similar to internal for .NET. It means the member is accessible only from the framework in which it is defined.

Note: In 32-bit it acts like @public.

Zifre
So, UIImage is defined in UIKit, that means anything that is a class (or subclass) that is defined in UIKit should be able to access variables controlled by @package? Is that it?
Jasarien
Yes, anything in UIKit could access @package variables in UIKit, but anything else can't
Zifre