How can I set UIButton image, which Image is round shape with border I write related code but image not displaying in proper round shape.. Here is my code..
func roundedImageView(imgView: UIImageView, borderWidth: Float, borderColor: UIColor) { imgView.layer.cornerRadius = imgView.frame.size.width / 2 imgView.clipsToBounds = true imgView.layer.borderWidth = CGFloat(borderWidth) imgView.layer.borderColor = borderColor.cgColor }