How to pass object with NSNotificationCenter
问题 I am trying to pass an object from my app delegate to a notification receiver in another class. I want to pass integer messageTotal . Right now I have: In Receiver: - (void) receiveTestNotification:(NSNotification *) notification { if ([[notification name] isEqualToString:@\"TestNotification\"]) NSLog (@\"Successfully received the test notification!\"); } - (void)viewDidLoad { [super viewDidLoad]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(dismissSheet) name