Add an object to the beginning of an NSMutableArray?

Solution 1:

Simply

[array insertObject:obj atIndex:0];

Check the documentation

Solution 2:

As other answers have noted just use the insertObject:atIndex method. It is efficient as NSArrays do not necessarily consist of contiguous memory i.e. the elements don't always get moved when the insert happens especially for large arrays i.e. several hundred of thousand elements. See this blog Also note that in objective C only pointers are moved in the array so memmove can be used internally unlike C++ where copies have to be made.

Also this SE question.