我将 NSSNotifcation 发送到 iPhone 应用程序中的另一个视图控制器,但它的观察者方法收到两次通知,任何人都可以指导我
我已经使用此代码发布通知
[[NSNotificationCenter defaultCenter] postNotificationName:@"updateStatusOnFacebook" object:nil userInfo:nil];
并添加了观察者
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(postToWall) name:@"updateStatusOnFacebook" object:nil];