iOS Data types and Usage
AnyObject:
If you had a dynamic data that was changable in future then you can declare an object as anyobject.
var data:AnyObject!
NSMutableArray:
If you want an array that will be modify on run time then use NSMutableArray.You can add or remove an object at runtime.
You can also add array of values in that.
NSArray:
If you had an array that will not be change then you can use it as NSArray.Once you can assign values but not able to add.
If you had a dynamic data that was changable in future then you can declare an object as anyobject.
var data:AnyObject!
NSMutableArray:
If you want an array that will be modify on run time then use NSMutableArray.You can add or remove an object at runtime.
You can also add array of values in that.
NSArray:
If you had an array that will not be change then you can use it as NSArray.Once you can assign values but not able to add.
Comments
Post a Comment