画像の塗りつぶしの自分用メモ 未検証
let size = CGSize(width: 150, height: 150)
UIGraphicsBeginImageContext(size)
let cgContextRef = UIGraphicsGetCurrentContext()
cgContextRef!.setFillColor(UIColor.gray.cgColor)
cgContextRef!.setAlpha(0.8)
cgContextRef!.fill(CGRect(x: 0, y: 0, width: 300, height: 300))
let colorImage = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
let view5: UIImageView = UIImageView(frame: CGRect(x: 0, y: 0, width: 300, height: 300))
view5.image = colorImage