发通知

A给B发通知:
A:[[NSNotificationCenter defaultCenter] postNotificationName:@"changeAddress" object:[NSString stringWithFormat:@"%@",model.district]];

B:[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeAddress:) name:@"changeAddress" object:nil];
-(void)changeAddress:(NSNotification *)notification
{

}

你可能感兴趣的:(发通知)