I am trying to hide a uiview but still have it receive touch events. I am setting the alpha to 0 like so:
mainView.alpha = 0.0
also I've tried setting this to true but it doesn't do anything
mainView.userInteractionEnabled = true
Trouble is it no longer receives touch events when I do this. How can I enable it to receive touch events but be effectively hidden?
Set your UIView
's backgroundColor
to UIColor.clear
.
mainView.backgroundColor = .clear
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments