Posted By

guido70 on 03/08/10


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


elementi BASE: gestione eventi tra classi

 / Published in: Objective C

  1. /** per registrare un azione in base ad un evento:
  2. */
  3. // Erase the view when recieving a notification named "shake" from the NSNotificationCenter object
  4. // The "shake" nofification is posted by the PaintingWindow object when user shakes the device
  5. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(eraseView) name:@"shake" object:nil];
  7. /** INVIO dell'evento
  8. */
  10. // User was shaking the device. Post a notification named "shake".
  11. [[NSNotificationCenter defaultCenter] postNotificationName:@"shake" object:self];

Report this snippet  

You need to login to post a comment.