1.注册通知+发送通知
NSNotification *LoseResponse = [NSNotification notificationWithName:@"ChangeChannel" object:nil];
[[NSNotificationCenter defaultCenter] postNotification:LoseResponse];
2.接受通知
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeChannelNoti:) name:@"ChangeChannel" object:nil];
3.实现方法
- (void)ChangeChannel:(NSNotification *)noti
{
}
网友评论