1

I have a view like this :

enter image description here

The left back button & the right button is basically two white image (set in UIButton) with a particular opacity. Now it's look more or less visible on this background cover photo.

But if I change the background cover photo with something else, where the opacity & color of that cover image is closer to the two button's image, then it's difficult to see those two button.

Like this:

enter image description here

So I just wondering, Is there any way, so that I can detect the color of my cover image and I can change those two buttons image or color according to it?

Any kind of reference or guidance would be very much appreciable.

Shamas S
  • 7,507
  • 10
  • 46
  • 58
Tulon
  • 4,011
  • 6
  • 36
  • 56

1 Answers1

-1

I think you can use this function to determinate how light/dark is the background. Calculate an average of several pixel under your button.

Have fun! :D

B 7
  • 670
  • 7
  • 23