Guest User

Untitled

a guest
Jul 11th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. -(id)init
  2. {
  3. self = [super init];
  4. if(self){
  5. [[NSNotificationCenter defaultCenter] addObserver:self
  6. selector:@selector(receiveChatText:)
  7. name:ChatMessageReceived
  8. object:nil];
  9. return self;
  10. }
  11.  
  12. - (void)receiveChatText:(NSNotification *)note {
  13. NSLog(@"received chat text");
  14.  
  15. }
  16.  
  17. -(void) didReceiveMessage {
  18. [[NSNotificationCenter defaultCenter] postNotificationName:ChatMessageReceived
  19. object:nil
  20. userInfo:nil];
  21. }
Add Comment
Please, Sign In to add comment