Sort an NSArray in Descending Order

前端 未结 11 1179
死守一世寂寞
死守一世寂寞 2020-12-08 02:23

I have an NSArray of NSNumber objects that I have successfully sorted in ascending order using the following:

[myArray sortedArrayU         


        
11条回答
  •  南方客
    南方客 (楼主)
    2020-12-08 03:04

    The Dr. Touch website has a nice implementation of a category on NSArray to create a self-sorting array. This could be modified to keep the sort in whatever order was appropriate.

提交回复
热议问题