我有以下代码:
[[NSNotificationCenter defaultCenter] postNotificationName:kNewsfeedFetchCompleted object:self userInfo:userinfo];
只有这个,没有其他地方。这是我设置观察者的方式:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(newsfeedFetchCompleted:) name:kNewsfeedFetchCompleted object:nil];
问题是当我发表一篇文章时,newsfeedFetchCompleted 被调用了两次。这怎么可能?