发消息:
1 [[NSNotificationCenter defaultCenter] postNotificationName:@"WECHARTPAY"object:nil];
收消息初始化:
1 NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; 2 [notificationCenter addObserver:self selector:@selector(handlePayFinished:) name:@"WECHARTPAY" object:nil] ;
收消息处理方法:
1 - (void)handlePayFinished:(NSNotification *)notification 2 { 3 4 }
时间: 2024-10-27 19:40:58