I got stuck in another problem again but after a long time.
This time I have database (Core Data), having an attribute of
1 (first digit of first number)
3 (first digit of second number)
It seems your attribute is of type
NSString. Make sure you make it to
NSNumber, the sorting will then work as expected.
There is no need to
selector:@selector(compare:) in your sort descriptor as this is the default anyway.