Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Touch through UIImageView?

I have a transparent UIImageView with a button behind it. How can I touch "through" it and press the button underneath it?

Thanks

like image 527
iOSDev Avatar asked Aug 14 '11 23:08

iOSDev


1 Answers

Use UIImageView.userInteractionEnabled = NO;

That prevents it from receiving touches and all the touches will go through it.

like image 170
Daniel G. Wilson Avatar answered Oct 15 '22 02:10

Daniel G. Wilson