Upvote:1

Aprove answer
+ (id)createArrays {
    strings1 = [[NSArray alloc] initWithObjects:@"Something", @"Something else", nil];
    strings2 = [[NSArray alloc] initWithObjects:@"Yet another thing", nil];
    strings3 = [[strings1 arrayByAddingObjectsFromArray:strings2] retain];
}

Upvote:1

NSArray *array1 = [NSArray arrayWithObjects:@"Wow", @" that", nil];
NSArray *array2 = [NSArray arrayWithObjects:@" is", @" really", nil];
NSArray *array3 = [NSArray arrayWithObjects:@" terrible", @" code", nil];

NSArray *fullArray = [array1 arrayByAddingObjectsInArray:[array2 arrayByAddingObjectsInArray:array3]];

NSLog(@"%@", fullArray);

More Answer related to the Same Query

Upvote:0

[string3 appendString: string2];

Upvote:0

*string3 = malloc(sizeof(NSString*) * count); // Array of count strings
string3[0] = string1[0]; // Put on at index 0
NSLog(@"%@", string1[0]); // Log string at index 0

Credit Goes to: stackoverflow.com

Related question with same questions but different answers