0

My goal is to achieve something like this.

enter image description here

There is a background, above the background I added a view with an alpha set to 0.9 and background set to black. The bubbles are UIButtons, and I want to highlight them when they are clicked. But I don't know how to because these buttons' alpha is 1. Only their parent view's alpha is modified to 0.9.

Thank you for you help!

Huang C.
  • 398
  • 6
  • 17

1 Answers1

1

According to this answer.

Try set the alpha of the black background to 0.9 instead of the alpha for the view, something like view?.backgroundColor = UIColor.blackColor().colorWithAlphaComponent(0.5)

Then depending on the highlight selection of button, set the alpha accordingly.

Community
  • 1
  • 1
zc246
  • 1,514
  • 16
  • 28