ghostsource
ghostsource

Reputation: 121

NSArray NSDictionary preserve addobject order

Is the addObject method of NSArray guaranteed to preserve order? So if I add one object1 and then object2 and then print them, will they always be in order? Is this also true for NSDictionary allValues array?

Upvotes: 1

Views: 675

Answers (1)

user23743
user23743

Reputation:

Arrays have guaranteed order, dictionaries do not. Neither do sets.

Upvotes: 8

Related Questions