Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8496691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:55:23+00:00 2026-06-10T23:55:23+00:00

I am setting the dictionary with NSNmuber- number (for alarm) with : #define kTimerNameKey

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T23:55:24+00:00Added an answer on June 10, 2026 at 11:55 pm

    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:

    [[NSNotificationCenter defaultCenter] postNotificationName:@"notif_sendNumber" Object:myNumber];
    

    then in your receiving class, you can go:

    -(void)myReceivingMethod:(NSNotification *)notification
    {
        NSNumber *receivedNumber = (NSNumber *)[notification object];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a plist dictionary with several arrays where each have different number of
Setting up a project structure; I am thinking is it better to have somewhat
Setting the scene: My asp.net web application carries a version number which is incremented
Setting up environment variables for hundreds of tests get old very quick. Is there
I have a GridView with an EditItemTemplate, to which I am binding a Dictionary
In my application, I have some color settings, font settings and a Dictionary containing
I have a table (dictionary of dictionaries) to store mapping of integers to strings.
I have a NSDictonary object that I am setting a set of objects as
I have the following interface in my project. public interface Setting<T> { T Value
I have to store, in 2 cookie dictionary/keyed cookie, a user's preference for hiding

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.