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

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -