My NSArray contains 100, 110, 91, 98, and 87, all NSStrings.
I'd like to sort them to show up in this order: 87, 91, 98, 100, 110.
Instead they are showing up as 100, 110, 87, 91, 98.
I can't start the array with all ints instead of strings unfortunately. Anyone have any ideas on how to tell if the array contains ONLY numbers from strings, maybe using a for loop? Then I could just convert them all to ints within the array and do the sort that way. Or maybe there is an easy way I am missing?
Let me know if anyone has any ideas.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…