Hi, everyone,
I have a question about the objective-C. I use the following code to add a contains from an array to another array. However, the second array is null. Can anyone help me? Thank you.
titleArray = [[csvDataArrayString objectAtIndex:0] componentsSeparatedByString:@","];
NSString *title;
dataTitleArray = [[NSMutableArray alloc] init]; // after add this statement it's ok
for(int i=0; i<[tTitleArray count]; i++)
{
title = [csvPersonalTitleArray objectAtIndex:i];
[dataTitleArray addObject:title]; // the dataTitleArray is null
}