realm-swift icon indicating copy to clipboard operation
realm-swift copied to clipboard

RLMArray insertObjects:atIndexs:

Open dev-gao opened this issue 8 years ago • 1 comments

Why not offer insertObjects:atIndexs: in RLMArray.h as a public method ? I can not find a proper method to insert objects at the middle of a RLMArray instance. Write an category for this case is not a better idea.

dev-gao avatar Nov 08 '16 10:11 dev-gao

Currently you can call -[RLMArray insertObject:atIndex:] multiple times to insert multiple objects in the middle of an array.

We can certainly consider adding -insertObjects:atIndexes: (and -replaceObjectsAtIndexes:withObjects:) for consistency with NSMutableArray. We already support -addObjects:.

bdash avatar Nov 08 '16 16:11 bdash