我想在我的Xcode project.Suggest上的按钮,添加35%的透明色彩与图像我该怎么做我的情况
我的代码:
// Button
let aButt = UIButton(type: .custom)
aButt.frame = CGRect(x: X, y: Y, width: W, height: H)
aButt.tag = i
aButt.setTitle("\(peObj[EVENTS_TITLE]!)", for: .normal)
aButt.contentVerticalAlignment = .bottom
aButt.titleLabel?.font = UIFont(name: "OpenSans-Bold", size: 13)
aButt.setTitleColor(UIColor.white, for: .normal)
aButt.addTarget(self, action: #selector(popularEventButt(_:)), for: .touchUpInside)
getParseImage(object: peObj, colName: EVENTS_IMAGE1, button: aButt)
aButt.imageView?.contentMode = .scaleAspectFill
aButt.clipsToBounds = true
aButt.backgroundColor = UIColor.lightGray
aButt.layer.cornerRadius = 8