How to add object at first index of NSArray

后端 未结 10 919
离开以前
离开以前 2021-02-01 06:03

I want to add @\"ALL ITEMS\" object at the first index of NSARRAY.

Initially the Array has 10 objects. After adding, the array should contains 11 objects.

10条回答
  •  你的背包
    2021-02-01 06:14

    NSArray is not dyanamic to solve your purpose you have to use NSMutableArray. Refer the following method

    - (void)insertObject:(id)anObject atIndex:(NSUInteger)index;
    

提交回复
热议问题