答案 0 :(得分:2)
您可以使用不透明度创建一个黑色的UIView
,并使其与UIImageView
的大小相同,并将其添加为子视图。尝试类似:
let tintView = UIView()
tintView.backgroundColor = UIColor(white: 0, alpha: 0.5) //change to your liking
tintView.frame = CGRect(x: 0, y: 0, width: imageView.frame.width, height: imageView.frame.height)
imageView.addSubview(tintView)
imageView =您的UIImageView
答案 1 :(得分:2)
window.tinymce