I have a plist eastDict- I'm trying to make the keys into a sorted array but for some reason it's sorting incorrectly. The keys are: 1, 50, 100, 150, 200, 300, 400, 500.
I sorted the keys into an array like this:
I eventually realized there was something wrong with the array, and so I looped through it and found that the keys were sorted as follows: 1, 100, 150, 200, 300, 400, 50, 500.
I have no clue as to why this would be.
I sorted the keys into an array like this:
Code:
NSArray *ranges = [[eastDict allKeys] sortedArrayUsingSelector: @selector(compare: )];
I eventually realized there was something wrong with the array, and so I looped through it and found that the keys were sorted as follows: 1, 100, 150, 200, 300, 400, 50, 500.
I have no clue as to why this would be.