我有一个NSNotification
的观察者,它被称为两次.我不知道该怎么办.
我在谷歌上搜索了一下,但没有找到解决方案.
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(connectedToServer:) name:@"ConnectedToServer" object:nil];
- (void)connectedToServer:(NSNotification*)notification {
[[NSNotificationCenter defaultCenter] postNotificationName:@"SendMessageToServer" object:message];
}