Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(id)init
- {
- self = [super init];
- if(self){
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(receiveChatText:)
- name:ChatMessageReceived
- object:nil];
- return self;
- }
- - (void)receiveChatText:(NSNotification *)note {
- NSLog(@"received chat text");
- }
- -(void) didReceiveMessage {
- [[NSNotificationCenter defaultCenter] postNotificationName:ChatMessageReceived
- object:nil
- userInfo:nil];
- }
Add Comment
Please, Sign In to add comment