利用mask設計圖片
主題:Dancing Paris
這個作業真是幾經波折終於完成了。。。。。
制作時,參考了很多前輩及同學的文案內容,但仍一直呈現不出想要感覺,好挫折啊~
終於。。。終於。。。在Peter的協助下,完成了。
附上文案內容,留念一下!|
import UIKit
let EiffertowerImage = UIImage (named: “Eiffertower.jpg”)
let EiffertowerImageView = UIImageView(image:EiffertowerImage)
let dancing2Image = UIImage (named:”dancing2.png”)
let dancing2ImageView = UIImageView(image:dancing2Image)
let frame = CGRect(x: 0, y: 0, width: 748, height: 879)
EiffertowerImageView.frame = dancing2ImageView.frame
let redView = UIView(frame: frame)
redView.backgroundColor = UIColor(red: 1, green: 0, blue: 0, alpha: 0.4)
redView.mask = dancing2ImageView
EiffertowerImageView.addSubview(redView)
EiffertowerImageView