I recently created a UIScrollView and put some buttons inside it but noticed that the clicks of the buttons (which should just display an alert) do not respond to touches.
I believe this is caused because UIScrollView swallows all touches.
I am wondering if there is a way to register touches of buttons (or any object that allows touches) within a UIScrollView?
I did some searching and found code similar to this:
Code:
// There are other variations out there on the web
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
if ([self pointInside:point withEvent:event]) {
return _scrollView;
}
return nil;
}
However, I am still unable to get the actual buttons to respond to a click, and I'm hoping someone can point me in the right direction.
Thanks.