ios - Swift Stable Sort? -


at time (march 28, 2015): if want use stable sort in swift, have use nsarray , sortwithoptions or write own stable sort in swift such insertion sort? see in apple swift docs sorted not stable.

example of stable sort in nsmutablearray:

[array sortwithoptions:nssortstable usingcomparator:^nscomparisonresult(id obj1, id obj2) {     return [obj1 compare:obj2]; }]; 

am missing option that's available me in swift other using objective-c or writing own sort?

as @michael put it, 1 can "write swift-wrapper calls objective-c function"


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -