Dynamic name of NSMutableDictionary?

Posted by Bruno on Stack Overflow See other posts from Stack Overflow or by Bruno
Published on 2010-05-10T16:09:45Z Indexed on 2010/05/11 13:24 UTC
Read the original article Hit count: 219

Filed under:
|
|
|

Hi everyone

I load from a txt file many info, and I would like, if possible, to dynamically create NSmutable dictionary with the elements of the txt.

For example, each is like that: id of element | date | text

What I'm asking is the equivalent of the NSString stringWithFormat:. Can we do the same for an Mutable Dictionary?

To be more practical, let's say the NSString *date is equal to "23/12/2009" (for europe). I want to create a dictionary called 23/12/2009 without declaring *23/12/2009 but just something like dictionaryWithFormat: @"%@", date];

I'm stuck on this, and I don't even know if it is possible. If not, what's the best way to approach that?

Thanks everyone

Regards

© Stack Overflow or respective owner

Related posts about dynamic

Related posts about dictionary