ios-notification

通知声明:

1
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(function_name) name:@"notification_name" object:nil];

接收通知:

1
[[NSNotificationCenter defaultCenter]postNotificationName:@"notification_name" object:self userInfo:nil];

ps: 一定要先addObserver 然后postNotificationName 否则会什么都调不到