You can set background color of view to the UIColor with alpha, and not affect view.alpha:
view.backgroundColor = UIColor(white: 1, alpha: 0.5)
or
view.backgroundColor = UIColor.red.withAlphaComponent(0.5)
You can set background color of view to the UIColor with alpha, and not affect view.alpha:
view.backgroundColor = UIColor(white: 1, alpha: 0.5)
or
view.backgroundColor = UIColor.red.withAlphaComponent(0.5)