static void _processData(AppDelegate *self, NSInteger i) {
// Notice that the _window can be accessed here, even though it is a private ivar
// A compiler error (or warning) will happen if this method was outside the @implementation scope of AppDelegate.
NSLog(@"Processing %d in window %@", i, self->_window);
}
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
for (NSInteger i = 0; i < 200; i++) {
_processData(self, i);
}
}

Leave a comment