initWithArray vs mutableCopy


#1

In -(void)loadAllItems we set the allItems NSMutableArray by doing:

In -(NSArray *)allAssetTypes we set the allAssetTypes NSMutableArray by doing:

Loading these two arrays seemed to use the same logic up until this point. Why are we using different methods?


#2

Since nobody who actually knows has said anything, I’ll give you my guess.
It is clear that a bunch of differences in the code from one bit to another are pedagogical – to show us that different methods exist to do some job. This difference looks like that to me.
Clearly this is a good news / bad news sort of thing. One the one hand it is good to know even more of the choices available for getting something done. On the other hand, learning this stuff is difficult enough without unexplained coding differences. It is unfortunate that the authors don’t have more to say about the choices in the code. Some of the choices seem rather inconsistent and don’t necessarily “make sense” unless the purpose is to show alternate methods. But since they don’t have much to say on the subject, you are left to wonder if there is some other point that you’re not getting.