Based on the docs, I’m able to rearrange child views A,B,C of a container view to C,A,B by doing a “removeObject(A/B/C)” followed by a “pushObject(C/A/B)”. For larger sets (my actual example is currently 64), is there a possibly more efficient way (such as say, just modifying a couple of values in the existing child views array? Although the remove/pushObject is probably just fine, given the relatively larger time for the actual UI re-render.
Thanks so much.
Based on the docs, I’m able to rearrange child views A,B,C of a container
Share
If you were using an
ArrayControllerin combination with aCollectionView, you could useSortableMixinsupport to order its content according to your needs. Then your collection rendering would be updated as needed without any intervention on your side.You could, for example, bind the
sortPropertiesproperty of you controller to reflect the sorting criteria to apply.(If you need further explanation, some code extract from your app will be welcome)