Tap events not working in UIViews inside a UIScrollView

I have a UIView series inside a UIScrollView, and the UIViewControllers for these views do not receive touch events. If I look at the views from the scroll, this will work.

I have included userInteraction in the views, but it still does not work!

This should be possible, and I would be very grateful if someone could point me in the right direction!

Thanks,

Mike

+3
source share
5 answers

I overcame this problem by overriding the loadView method of the view controller and setting the view instance variable to a simple subclass of UIView that runs on touches.

+1

, viewcontroller, ? , , , .

+1

, scrollview .

mahboudz - , - . , , . , . Apples scrollViewSuite. tapDetectingImageView. , ! , !

0

. .

0

, , .

0

Source: https://habr.com/ru/post/1716613/


All Articles