let roundCorner = RoundCornerImageProcessor(cornerRadius: 20)
imageView.kf.setImage(with: url,
options: [.processor(roundCorner),
.cacheSerializer(FormatIndicatedCacheSerializer.png)]
)
您不需要使用RoundCornerImageProcessor
self.userPhoto.layerCornerRadius = 50
self.userPhoto.clipsToBounds = true
self.userPhoto.backgroundColor = Colors.accent
self.userPhoto.kf.setImage(with: url, placeholder: UIImage(named: "ic_camera_alt_48pt"))