您的位置:首页 > 其它

怎样在Cell中使用第三方库加载图片

2015-11-07 15:43 330 查看
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{

UITableViewCell *cell = [tableView
dequeueReusableCellWithIdentifier:CellIdentifer
forIndexPath:indexPath];

UserModel *user=[UserModel
getCurrentUser];

cell.textLabel.text=[[GroupList
groupsWithUser:user][indexPath.row]
title];

//加载图片

[cell.imageView
sd_setImageWithURL:[NSURL
URLWithString:[NSString
stringWithFormat:@"http://42.96.208.2:8080%@",user.image]]placeholderImage:[UIImage
imageNamed:@"touxiang"]];

return cell;

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: