Just call one of the NSMutableArray initializers, for example:
subArrayData = [[NSMutableArray alloc] initWithObjects: @"Select one", @"Accommodation and travel hospitality", @"Apartments and villas", @"Bed and Breakfast", @"Caravan parks and campsites", @"Hospitality", @"Hotels and Motels", @"Snow and Ski lodges", @"Tourist attractions and tourism information", @"Tours and Holidays", @"Travel agents and Services", nil]];
In cases where you are dealing with an existing NSArray , you can do mutableCopy :
- (id)initWithArray:(NSArray *)array { self = [super init]; if (nil != self) { subArrayData = [array mutableCopy]; ...
justin
source share