Quote:
Originally Posted by RickMaddy
You can't really. What are you actually trying to accomplish with the keys and values?
You can get the keys as an array and sort it. Then iterate over the sorted key array and use each key to get the value from the original dictionary. But I don't know if that solves what you are trying to do.
|
Here is the whole story:
1. I retrieve elements from my SQLITE database sorted and place these elements in a array of objects. All good here.
2. I then traverse the array using an NSEnumerator
Right here I realized I lost the sorting I got from the database. Somehow the Enumerator sorts by default on when the objects were created.
So now I'm trying to resort the array because I dont want to pay for going to the database.
So, my real question is how can I traverse the array without loosing the order.