//创建一个字典
NSDictionary *dict =[[NSDictionary alloc] initWithObjectsAndKeys:[@"公司-" stringByAppendingString:str],@"TZ", nil];
//创建通知
NSNotification * notification =[NSNotification notificationWithName:@"FP" object:nil userInfo:dict];
//通过通知中心发送通知
[[NSNotificationCenter defaultCenter] postNotification:notification];
、、接收通知
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(FP:) name:@"FP" object:nil];
- (void)FP:(NSNotification *)text{
self.Fapiao = text.userInfo[@"TZ"];//发票
//
//
NSLog(@" self.DCName =%@",self.Fapiao);
NSLog(@"--发票--接收到通知------");
[table reloadData];
//[[NSNotificationCenter defaultCenter]removeObserver:self name:@"FP" object:nil];//第一个控制器销毁时 将你创建的通知销毁
}