Are keys and values in an NSDictionary ordered?

后端 未结 6 1238
孤街浪徒
孤街浪徒 2020-11-28 12:30

I mean: Is the order of keys and values in an NSDictionary always the same like how they were specified when initializing the NSDictionary? Or should I better maintain a sep

6条回答
  •  借酒劲吻你
    2020-11-28 12:39

    Matt Gallagher wrote a blog post titled “OrderedDictionary: Subclassing a Cocoa class cluster” covering exactly this issue, complete with sample code.

提交回复
热议问题