ich die Codes unten verwendet, um die MenüauswahlindexpostNotification die Funktion korrekt ausgelöst, aber userinfo (NSDictionary) hat nichts
NSDictionary *userInfo= [NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"123"]
forKey:@"Index"];
[[NSNotificationCenter defaultCenter] postNotificationName: @"notifyToMenuSelectionNotification"
object: userInfo];
-(void)menuSelectionNotification:(NSNotification *)notification
{
NSLog(@"%@", notification.userInfo);
}
menuSelectionNotification ausgelöst wird richtig,
aber NSLog Ausgabe notification.userInfo ist
zu benachrichtigen noch {null}begrüßen jede comment1
Jetzt haben Sie drei doppelte Antworten haben - wählen Sie ein gelegentliches Ihr Problem zu lösen :) – tilo