I am setting the dictionary with NSNmuber- number (for alarm) with :
#define kTimerNameKey @"kTimerNameKey"
NSDictionary *userInfo = [NSDictionary dictionaryWithObject:number forKey:kTimerNameKey];
When i get on the delegate a notification i have this :
NSDictionary *userInfo = notification.userInfo;
i can log it and see that its ok.
My problem is , how can i extract from userInfo , the number for the key ?
if i use objectForKey:kTimerNameKey , he doesnt know this key(its in another class)
So, extracting on the delegate the number from the userInfo is my problem.
Thanks.
Can’t you just #import “YourOtherClass.h” that contains the definition for the kTimerNameKey ?
Otherwise, if you’re using NSNotification to post notification, you can pass along the value of the number:
then in your receiving class, you can go: