NSArray *array = [[NSArray alloc] initWithObjects:@\"ΕΛΤΑ\",
@\"ΕΛΤΑ COURIER\", @\"ACS\", @\"ACS ΕΞΩΤΕΡΙΚΟ\",
@\"DHL\",
If you really want a Null-ish item in your collection, NSNull is there for that.
You can't add an object to an NSArray
because that class is immutable. You have to use NSMutableArray
if you want to change the array after it is created.
If you must add a nil
object to a collection, use the NSNull
class:
The NSNull class defines a singleton object used to represent null values in collection objects (which don’t allow nil values).
Assuming "array" is of type NSMutableArray:
....
[array addObject:[NSNumber numberWithInt:2];
[array addObject:@"string"];
[array addObject:[NSNull null]];