我的一个名为 Message.m 的班级正在发布带有如下对象的sentObject通知
NSDictionary *sentObject = [NSDictionary dictionaryWithObjectsAndKeys:draftData.arr,@"data", nil];
//Post notification to inform a receiver to reload data
[[NSNotificationCenter defaultCenter] postNotificationName:@"reloadDuringSave" object:self userInfo:sentObject];
DraftData.m 将成为接收通知的接收者,如下所示
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(dataReloaded:)
name:@"reloadDuringSave"
object:nil];
对于发布通知,userInfo可以是nil 或可以是object(如本例sentObject中的类型NSDictionary)。
问题:
objectinaddObserver方法的其他参数是什么?它们可以是 以外的任何东西nil,如果是,那又是什么?