Reputation:
Im trying to put a view with labels above an image and apply a dark transparent color to my view but Xcode applies the alpha to the parent view and the child labels, how do I prevent that the labels inherit the alpha color from the parent view? I have tried several methods :/
Upvotes: 1
Views: 551
Reputation: 2668
instead of setting UIView's
alpha, set it's backgroundColor's alpha like
view.backgroundColor = UIColor(red: 250 / 255, green: 250 / 255, blue: 250 / 255, alpha: 1) //set alpha
you can't prevent inheritance.
Upvotes: 1