I’m a noob, and I’m sorry because the question is really stupid. I have An NSArray which contains titles for UITableView rows in NSDictionaries in Russian and I need to sort these titles in alphabetical order. How can I do it?
Help me, please.
Thanks in advance!
On iOS 4.0 and later, you can use a sort descriptor. Assuming
titleis the key under which your title strings are stored in the dictionaries:Another option is to use a block-based sort method:
If you need your app to run on iOS 3.1.3 and earlier, however, you can either:
-sortedArrayUsingSelector:, or-sortedArrayUsingFunction:context:.In each case, your method or function’s body will be essentially the same as the body of the block in the second example above. The NSArray class reference contains examples of both techniques.