algorithm - How do I Sort Collections in Objective-C? -


I have an integer array in my objective-program. I want to sort it (ascending or descending, it does not matter) in C ++ I use the sort algorithm in the STL algorithm library. how can I do this?

The method of "cocoa" is to create an NSNumber object, assign them an NSArray, and Using Selector: @Sylector (compare) Use the method (or one of the other NSRA sort methods).

If you want to create a series of primitive NSInteger (int) values, then you can use the C function underlying.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -