NSNotification 常用的几个方法,代码如下:
// 发送通知 [[NSNotificationCenter defaultCenter] postNotificationName:@"broadcastName" object:nil]; // 接收通知 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(doSomething:) name:@"broadcastName" object:nil]; // 移除通知 [[NSNotificationCenter defaultCenter] removeObserver:self name:@"broadcastName" object:nil];
原文:http://www.cnblogs.com/jaxer/p/4984832.html