I used the codes below to notify the menu selection index
NSDictionary *userInfo= [NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"123"]
forKey:@"Index"];
[[NSNotificationCenter defaultCenter] postNotificationName: @"notifyToMenuSelectionNotification"
object: userInfo];
-(void)menuSelectionNotification:(NSNotification *)notification
{
NSLog(@"%@", notification.userInfo);
}
menuSelectionNotification is triggered correctly,
but NSLog output notification.userInfo is still {null}
Welcome any comment1
you are passing object in wrong way. Please try this –