答案 0 :(得分:0)
您需要做的就是使用铲斗填充工具填充星形外边框。 然后,使用原始imageView框架创建一个新的UIImageView,并使用" bringToFront()"将其放在原始图像的顶部。方法:
let imgView_bread = UIImageView(image: UIImage (named: "bread"))
imgView_bread.contentMode = .ScaleAspectFill
self.view.addSubview(imgView_bread);
let imgView_starBorder = UIImageView(image: UIImage (named: "star_border"))
imgView_starBorder.contentMode = .ScaleAspectFill
imgView_starBorder.frame = imgView_bread.frame
self.view.addSubview (imgView_starBorder);
self.view.bringSubviewToFront (imgView_starBorder);