for(NSString * ID in someNSMutableDictionary)
{
//do something
}
Now, will ID show up in the order they are added to someNSMutableDictionary?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
No, the order of the keys in
someNSMutableDictionaryis undefined. Dictionaries are about key-value pairs, not about order.If you need to iterate over dictionary with some order – order the keys and then iterate over the array of ordered keys and fetch each value individually.