SDWebImage Set Image To UIButton in CellView Using Swift

后端 未结 1 802
遥遥无期
遥遥无期 2021-01-27 01:06

Hi I am using SDWebImage to set image to a button in xcode 10.2.1.

I am trying the following

import SDWebImage

cell.bProfileImage.sd_setImage(with:URL(s         


        
相关标签:
1条回答
  • 2021-01-27 01:55

    The following is working perfectly.

    cell.bProfileImage.sd_setBackgroundImage(with: URL(string:
    individualChatsListArray[indexPath.row].profile_image), for:
    UIControl.State.normal, placeholderImage: UIImage(named:
    "default_profile"), options: SDWebImageOptions(rawValue: 0)) { (image,
    error, cache, url) in
    
    }
    
    0 讨论(0)
提交回复
热议问题