NSMutableArray - Add array at start

后端 未结 5 1492
逝去的感伤
逝去的感伤 2021-02-05 12:47

It is a simple pull to refresh case. I have data loaded into table and have a mutable data array at back-end, I receive a array of new data and want to add this complete array a

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-05 13:33

    Just simple way:

    NSMutableArray *arrayTmp = [firstArr addObjectsFromArray:myArray];
    myArray = arrayTmp;
    

提交回复
热议问题