Just had a quick question.
I have a method in a Class that sorts an array, gets information and then returns an NSArray with this code.
I discovered that I need to add object to the new array called "itemsFromSkill" so I changed it to an NSMutableArray. Should I go back to the method that sorts and returns an NSArray and have it return an NSMutableArray, or does it matter?
I remember a while back reading something about this and this is not the correct way but I can't remember? I think I would need to convert an NSArray to an NSMutableArray with a method like makeMutableCopy or something.
It' not a big deal. I was just wondering.
Thanks.
I have a method in a Class that sorts an array, gets information and then returns an NSArray with this code.
Code:
NSMutableArray *itemsFromSkill = [BoilerPlateCode returnItemsForSkill:itemStringLabel withItemList:skillsListDict];
I discovered that I need to add object to the new array called "itemsFromSkill" so I changed it to an NSMutableArray. Should I go back to the method that sorts and returns an NSArray and have it return an NSMutableArray, or does it matter?
I remember a while back reading something about this and this is not the correct way but I can't remember? I think I would need to convert an NSArray to an NSMutableArray with a method like makeMutableCopy or something.
It' not a big deal. I was just wondering.
Thanks.