elementi BASE: gestione eventi tra classi


/ Published in: Objective C
Save to your folder(s)



Copy this code and paste it in your HTML
  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];
  6.  
  7. /** INVIO dell'evento
  8. */
  9.  
  10. // User was shaking the device. Post a notification named "shake".
  11. [[NSNotificationCenter defaultCenter] postNotificationName:@"shake" object:self];
  12.  

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.