Sorting two NSArrays together side by side

前端 未结 4 778
一生所求
一生所求 2020-11-27 22:49

I have several arrays that need to be sorted side by side.

For example, the first array has names: @[@\"Joe\", @\"Anna\", @\"Michael\", @\"Kim\"], and a

4条回答
  •  情书的邮戳
    2020-11-27 23:26

    The best way is to restructure your data so that you only have one array. In your example, it would make most sense to create a new class with both name and address, put those in an array and sort it by name.

提交回复
热议问题