这是我用来设置用户图像的代码,它非常适合实际获取和设置图像。我得到了图片的白色轮廓。知道如何使它透明吗?
let processor = RoundCornerImageProcessor(cornerRadius: 50)
self.userPhoto.backgroundColor = Colors.accent
self.userPhoto.kf.setImage(with: url, placeholder: UIImage(named: "ic_camera_alt_48pt"), options: [.processor(processor)])