According to the documentation for UIVIew @property(nonatomic) CGFloat alpha
UIVIew @property(nonatomic) CGFloat alpha
The value of this property is a floating-point number in the
In swift
view.backgroundColor = UIColor.whiteColor().colorWithAlphaComponent(0.5)
UPDATED FOR SWIFT 3
view.backgroundColor = UIColor.white.withAlphaComponent(0.5)