Re: Exposing Methods in a Framework
Re: Exposing Methods in a Framework
- Subject: Re: Exposing Methods in a Framework
- From: "John C. Randolph" <email@hidden>
- Date: Wed, 31 May 2006 04:56:46 -0700
On May 31, 2006, at 2:21 AM, Håkan Waara wrote:
I would find it slightly cleaner by "hiding" your private ivars
inside a category of the class, that you define elsewhere. For
example:
This is what you have in your public header:
@interface ClassForEveryone : NSObject
{
}
...
@end
Then in a private header, you do:
@interface ClassForEveryone (Private)
{
id secretVar;
}
...
@end
Well, aside from not being legal Obj-C syntax, your example above
would have two different instance sizes for the same class.
The way that Apple's frameworks typically hide ivars today is to just
put a pointer with a name like "reserved" in storage declaration, and
then allocate their private storage in their -init methods.
-jcr
John C. Randolph,
VP, Engineering
Stealth Imaging, Inc. <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden