iPhone Obj C — Sorting a Mutable Array of dictionaries — display a string but sort by value
问题 I have a NSMutableArray with 30 dictionaries inside of it. Each contains a name and a value. I currently have the names sorted so that the show in a table view alphabetically. However, I'd like to make a UIButton to give the option of STILL DISPLAYING THE NAMES, but ordered by the value. The value doesn't need to be displayed. Also, where in the .m/.h files would these codes be placed? THANKS! 回答1: To be able to help you I need a test data to work with. Let's say your array with data looks