NSMutableArray (and all other classes with Mutable in the name) can be modified.
So, if you create a plain NSArray, you cannot change its contents later (without recreating it).
But if you create an NSMutableArray, you can change it
E.g. NSMutableArray has methods like -addObject: and -insertObject:atIndex:
NSMutableArray is editable, where as NSArray is read-only
So, if you create a plain NSArray, you cannot change its contents later (without recreating it).
But if you create an NSMutableArray, you can change it
E.g. NSMutableArray has methods like -addObject: and -insertObject:atIndex:
NSMutableArray is editable, where as NSArray is read-only
No comments:
Post a Comment
Kamleshwar