what's the difference between a C function (static or not) declared inside or outside the implementation block (@implementation ... @end) of a Objective-C class?
is this specially true?:
If you need to poke inside of the object directly, you can put this function inside of the @implementation block of your class, and then you can access instance variables with the C arrow operator. But that’s kind of naughty, so to preserve your Purity of Essence you should be using method calls on your object. End of Sermon. Here’s the evil:
@implementation OblateSphereoid
void drawEggThunk (DrawingContext *context, Rect areaToDraw, void *userData)
{
BWOblateSphereoid *dealie = (BWOblateSphereoid *)userData;
dealie->_frognatz = [NSColor plaidColor];
// and more stuff.
} // drawEggThunk
...
@end // OblateSphereoid
can i access instance variables of my class within functions (declared in the same class) in this way?