I have a UIScrollView to which I add a bunch of UIImageView's as sub views. Everything works fine apart from that I get input from the subv开发者_如何学Pythoniews when they are outwith the visible area of the scroll view. I would have thought the scroll view would prevent any events from reaching subviews outwith the visible area by default but I presume this isn't the case?
In which case I assume I have to use the content offset, subview positions etc. to calculate whether to prevent the input myself?
UImageView user interaction is not enabled as a default, so you probably enabled it somewhere. You could do a check on the scrollview delegate to see if that imageview is in front by a tag, and if it is not visible disable it.
精彩评论