I can't seem to append a string from arrayOne into arrayTwo. It's a very simple problem and I have Googled around and have tried different examples that I found below. Does anyone see the obvious issue here?
[_arrayTwo addObject:arrayOne[i]]; // int i
[_arrayTwo addObject:[arrayOne objectAtIndex:i]]; // int i
[_arrayTwo addObject:@"Test"]; // I can't even add a literal string
NSString *tempString = [arrayOne objectAtIndex:i];
[arrayTwo addObject:tempString];
NSLog Output:
NSLog(@"%@", _imageArray); // Result is "(null)"
Additional Notes:
I believe _imageArray is nil
Try adding in
_imageArray = [[NSMutableArray alloc] init];
In your init method call.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.