A few things here.
info = [_breedlist objectAtIndex:i]
is missing a semi-colon at the end.[dataArray = addObject:info.breedName];
has an extra equal sign stuck in there.- What you're looking at is the
description
from thedataArray
variable, which adds quotation marks to the output just to make it clear to you what is actually contained in the array for debugging purposes. The quotes are not actually part of the string stored. - In the
for
loop, useNSUInteger
versesint
.[_breedlist count]
will return anNSUInteger
and so it is best if your comparison withi
is comparing two variables of the same type.
Another thing to change is the way you're allocating the initial array.
Move this section of code to before the for loop:
if (!dataArray) {
dataArray = [[NSMutableArray alloc] init];
}
You do not need to check it on every iteration, you're just burning cycles with no benefit.