Willkommen auf unserem Seminar-Blog

Immer auf dem aktuellen Stand bleiben

Dieser Seminar-Blog befindet sich noch im Aufbau und wird in den kommenden Tagen entsprechend verfeinert.

Member Login

Lost your password?

Registration is closed

Sorry, you are not allowed to register by yourself on this site!

You must either be invited by one of our team member or request an invitation by email at viad.info {at} zhdk {dot} ch.

Minimal Event-Example

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")
}