I have a UIView with an alpha of 0.5 which I add as a subview to my primary view in order to gray-out everything else. I want to add an additional UIView to this gray UIVie
Set the UIView background color alpha not it's alpha directly.
Objective-C
UIView *view;
...
view.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:.6];
It's not the same as:
view.backgroundColor = [UIColor blackColor];
view.alpha = .6;
Swift
view.backgroundColor = UIColor.black.withAlphaComponent(0.6)