如何在Swift iOS游乐场上制作带有圆角的UIImageView?
里面需要填充一种颜色。
里面需要填充一种颜色。
let imageView = UIImageView(frame: CGRectMake(0,100,100)) imageView.backgroundColor = UIColor.redColor() imageView.layer.cornerRadius = 8.0 imageView.clipsToBounds = true
结果:
let imageView = UIImageView(frame: CGRectMake(0,100,100)) imageView.backgroundColor = UIColor.redColor() imageView.layer.cornerRadius = 8.0 imageView.clipsToBounds = true
结果: