ios - RLMResults sortedArrayUsingComparator behavior -


i've got 1 many property returns rlmresults objectswhere: query. need sort data linking uid's in linked list fashion (each object has previousid property points uid property of object before it).

i can nsarray sortedarrayusingcomparator this:

myarray = [myarray sortedarrayusingcomparator:^nscomparisonresult(myrlmobject *obj1, myrlmobject *obj2) {     if ([obj1.parenttileid isempty]) { // head of list must sorted first         return nsordereddescending;     } else if ([obj1.previousid isequaltostring:obj2.uid]) {         return nsordereddescending;     } else {         return nsorderedascending;     } }]; 

however, rlmresults has sorting based on 1 property. is there way same logic rlmresults? fallback solution how can convert rlmresults nsarray perform this?


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -