NSNotificationCenter selector arguments
I want to call not just methods from NSNotification but the method's arguments Something along the lines of
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playerinCombat:YES) name:@"PlayerinCombat" object:nil];
and not just
@selector(playerinCombat:)
just to use with
+ (BOOL)playerinCombat:(BOOL)flag {retu开发者_Python百科rn flag; if (flag){NSLog(@"Player in Combat.");} if (!flag){NSLog(@"Player not in Combat.");}}
But it won't work. Any ideas?
On second thought userInfo can be used (I think)
精彩评论