0

I am programming a game with a end screen. It's a view with a UIImageView on it.

The imageView has a UIVisualEffectView additionaly.

There is a button on my end screen (No, it's not part of the imageView).

If you touch it, it won't change it's alpha, like usual.

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Josef Büttgen
  • 131
  • 2
  • 12

1 Answers1

0

All you have to do is to initialize your button with UIButton(type:) and .System as type. Something like this:

var button = UIButton(type: .System)

If you don't use this, your button will not change it's alpha while being pushed.

Josef Büttgen
  • 131
  • 2
  • 12