图像URL的数据类型问题

时间:2016-03-15 04:06:25

标签: ios objective-c uiimage nsdata

我确定这是一个简单的解决办法,但我似乎无法解决这个问题......

group[PF_GROUP_FEATURED] is just a database reference to a URL. I am trying to get these images to show up in my tableView cells.

我的错误是"不兼容的指针类型将UIImage发送到参数类型NSString .."

UIImage *image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:group[PF_GROUP_LOGO]]]];
    cell.imageView.image = [UIImage imageNamed:image];

enter image description here

2 个答案:

答案 0 :(得分:4)

cell.imageView.image = image;

答案 1 :(得分:2)