According to the documentation for UIVIew @property(nonatomic) CGFloat alpha
The value of this property is a floating-point number in the
Simplest solution as discussed is to change the alpha as follows : Updated version for Xcode 8 Swift 3 is :
yourParentView.backgroundColor = UIColor.black.withAlphaComponent(0.4)
Objective C:
yourParentView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5];
Refer Apple Developer Docs here : https://developer.apple.com/reference/uikit/uiview/1622417-alpha