12. Oktober 2010
I've uploaded a minimal Event example which can be found on ...Mobile Screens/MinimalEvent. Description A Subclass "dispatches" a custom Event which will bubble up to its ancestor. All what you need: Dispatcher in the Subclass:[[NSNotificationCenter defaultCenter] postNotificationName:@"myCustomEvent" object:self ];Listener in the Ancestor-Class:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(eventCameThrough:) name:@"myCustomEvent" object:nil ];and the executing method:-(void)eventCameThrough: (NSNotification *) notification { NSLog(@"event arrived") }