Reputation: 12431
I have a class with 2 NSNotifications implemented
//Set up notifications
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(getData)
name:@"Answer Submitted"
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(reloadTable)
name:@"Comment Submitted"
object:nil];
I would just like to check if it is ok to set 2 observers in a single class? Also when I remove observer, I am only removing one observer in dealloc method. Is that an issue?
Upvotes: 2
Views: 80