通知中所传的值
1、将所要传的值传过去(所传值的.m文件)
[[NSNotificationCenter defaultCenter] postNotificationName:@"requestData:" object:_respData];
2、接收值的.m文件
- (void)viewDidLoad
{
[super viewDidLoad];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(requestData:)
name:@"requestData:" object:nil];
}
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (void)requestData:(NSNotification *)aNotification
{
NSDictionary *dic = [NSDictionary dictionaryWithDictionary:aNotification.object];
NSLog(@"%@",dic);
}