That error is telling you that the object that you retrieved from imgArray
was not a NSString
, but rather was, itself, an NSArray
. Examine what you retrieved (either NSLog
it or examine it in the debugger) and you'll see that it's an array.
For example, if the associated object in imgArray
was returning, itself, another array, then you'd have to grab the details from that. If for example, the first item in that array was the image URL string, then you'd do something like:
NSArray *imgDetailsArray = imgArray[indexPath.item];
// let's assume that the first item in that array was the URL string, so let's grab the first item
NSString *str = imgDetailsArray[0];
// now we can use that string
frstUrl=[NSURL URLWithString:str];
[imageView setImageWithURL:frstUrl
placeholderImage:[UIImage imageNamed:@"placeholder.png"]];
[imageView setImageWithURL:frstUrl];