하나의 알림을 게시하고 두 개의 서로 다른 개체가 두 가지 다른 방법을 실행하도록 할 수 있습니까?여러 개체에 대한 단일 알림?
[[NSNotificationCenter defaultCenter] postNotificationName:@"locationAdded" object:nil];
OBJECT ONE :
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(reloadAnnotations:)
name:@"locationAdded"
object:nil];
OBJECT 2 :
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(reloadAnnotations:)
name:@"locationAdded"
object:nil];
. . . 내가 의심으로
가 아니면 것 I는 고유 한 이름 (예)
[[NSNotificationCenter defaultCenter] postNotificationName:@"updateTable" object:nil];
[[NSNotificationCenter defaultCenter] postNotificationName:@"updateMapView" object:nil];
및 전화 [[NSNotificationCenter defaultCenter] postNotificationName : @ "locationAdded"개체 : 없음]; – Andriy