NSString *const notification = @"notification";
Notification变量,@"notification"这个值存于通知中心中,信息中心通过这个值来识别变量
NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
[center addObserver:self selector:@selector(action:) name:notification object:nil];
-(void)action:(NSNotification*)notify :这个方法是接受到notification这个通知所调用的方法
2.调用
NSNotificationCenter * center = [NSNotificationCenter defaultCenter];
[center postNotificationName:notification object:nil userInfo:[NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt:SMSRecommendNotification] , @"actcode",nil]];
[NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt:SMSRecommendNotification]
这个是传递给-(void)action:(NSNotification*)notify 的参数。