I have three arrays and I have copied all these arrays into a single array. All these three arrays are arrays of dictionaries.All arrays has a field called picture, but that pictures is coming from different sources- URL in one array, data in other and files in the third one.
Say, Array1 has dictionaries with a key - picture and its loaded from NSURL
.
Similarly, Array2 and Array3 has dictionaries with same key name - picture and loaded from ContentofFiles
and NSData
.
Now, I want to populate tableview, of course,m having Custom UITableViewCell
, it has image view as its content view. To load that image, what should I do.
I was doing this thing..
NSURL *url = [NSURL URLWithString:[[contactList objectAtIndex:indexPath.row] objectForKey:@"picture"]];
cell.contactImageView.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:url]];
But, this will crash if cell.contactImageView.image
don’t receive image from NSURL.So, what should I do? Any help, will be appreciated
But,