This question already has an answer here:
what is param for object, nsnotification addObserver
Normally, I'm using
nil in object parameter while adding observer in any class. Now, My Question is what is use of
object parameter while adding observer, for posting, I can understand that, It's useful for pass any object as notification object.
[[NSNotificationCenter defaultCenter] addObserver:self selector: @selector(testMethod:) name:@"userDetailUpdatedNotification" object: nil];
Yes, This is bit silly question but please explain me if you have knowledge about it. So, I can't miss any advantage of passing object while adding observer.
As per this question's answer, I've still confusion. If it's for filtering only why it's not as boolean type and which kind of object it's require. If possible please explain me using some example.