You cannot - NSArray is an immutable array, and as such, after its creation, it cannot be modified. You have to turn it into an NSMutableArray , in which case it will be simple:
NToDel.addObject(addInNToDelArray)
Alternatively, you can insert a value during instance creation:
var NToDel:NSMutableArray = [addInNToDelArray]
but this is not about adding, but about initialization - and in fact, after this line you cannot change the elements of the array.
Please note that there is an error in your line: the \ character must be escaped as follows:
var addInNToDelArray = "Test1 \\ Test2"
source share