Wednesday, January 28, 2015

When to use NSMutableArray and when to use NSArray?

Normally we use mutable version of array where data in the array will change. For example, you are passing a array to function and that function will add some elements to that array or will remove some elements from array, then you will select NSMutableArray. When you don’t want to change your data, then you store it into NSArray. For example, the country names you will put into NSArray so that no one can accidentally modify it.
NSDictionary, NSMutableDictionary
NSString, NSMutableString

NSSet, NSMutableSet

0 comments:

Post a Comment

About

Blog Archive

Powered by Blogger.

Blog Archive