Hi all,
I am trying to display an different image in each of the rows within the UITableView. I have all the image file within the App and they are all .gif format. I have been stabbing at the code with our success all day. If I echo out the content of the string "flag" the correct names of the images are there. Can anyone help with getting the code below to work.
I have the following code:
Code:
cell.textLabel.text = [NSString stringWithFormat:@"%@",[[objectsForCharacters objectForKey:[arrayOfCharacters objectAtIndex:indexPath.section]] objectAtIndex:indexPath.row]];
NSString *flag = cell.textLabel.text;
UIImage *image = [[UIImage imageNamed: flag]:@"gif" ];
cell.imageView.image = image;