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 3603592
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:53:27+00:00 2026-05-18T20:53:27+00:00

I am little bit backward in knowledge on these three topics: NSMutableDictionary , NSEnumerator

  • 0

I am little bit backward in knowledge on these three topics: NSMutableDictionary, NSEnumerator, NSMutableSet. When I want to use them, it feels very hard, even when I’ve gone through the developer documentation.

Is there any sample code to understand it clearly for all three topics?

Please help me.

Thank you,
Madan Mohan.

  • 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-05-18T20:53:28+00:00Added an answer on May 18, 2026 at 8:53 pm

    The best way to understand these depends on what your prior experience is. NSDictionary is exactly what it sounds like: a dictionary. What that means is that given a key (or a headword, as in a dictionary), you can look up a value (or definition):

    For instance, this dictionary gives information about my dog:

    KEY        VALUE
    -------------------------------------------
    @"name"       @"tucker"
    @"species"    @"canis lupus familiaris"
    @"favorite"   @"biscuits"
    

    With a dictionary dogInfo containing that information, we could send [dogInfo objectForKey:@"name"] and expect to receive @"tucker".

    The difference between NSDictionary and NSMutableDictionary is that the latter allows changes after initialization. This lets you do things like [dogInfo setObject:@"fetch" forKey:@"game"]. This is helpful for maintaining state, memoizing referentially transparent requests, etc.

    NSSet is a way to have a bunch of objects, with a few important bits: there is no defined order to those objects, and there can only be one of each object (no duplicates). Use NSSet for when you need to contain unique, unordered objects. NSMutableSet is the variant of NSSet which allows for changes (such as adding or removing objects) after initialization.

    NSEnumerator is a bit more complicated, but you usually won’t need to deal with it unless you are writing your own libraries, are coding archaically, or are doing complex enumerations. Subclasses of NSEnumerator are used by collection classes, such as NSDictionary, NSArray, and NSSet, to allow their objects to be enumerated. Usually, you’d just enumerate over them using a foreach-loop, since they all implement <NSFastEnumeration>. But sometimes, you’ll want to do more specific things, like enumerate over the objects (instead of the keys) of a dictionary, or enumerate over an array in reverse. This is where instances of NSEnumerator (usually defined as properties on your collection objects) will become helpful.

    Update

    Justin in the comments pointed out that NSEnumerator conforms to <NSFastEnumeration>; that means, the chances are next-to-nothing that you’ll need to know how to use an NSEnumerator; you can just do a foreach loop over the enumerator itself, like so:

    for (id object in [dogDict objectEnumerator]) {
      // doing something with the object, disregarding its key
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a little bit confused. I want to start learn Flex3 with Eclipse and
Just a little bit curious, why PuTTY use its own version of private key
A little bit about my current situation: I have a decent knowledge of OOP
It's a little bit difficult to explain what I need, so I'll use some
I know a little bit of comprehensions in Python, but they seem very hard
I'm little bit confused about constants naming. kName NameKey NAME_KEY Definitely usage of these
it is a little bit strange to me that boost.asio doesn`t use basic concept
I'm a little bit lost here. In my nginx conf file I want a
I'm having a little bit of a problem here, whenever I use an action
I am a little bit confused with PHP. It's a simple question I want

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.