Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- iOS UIScrollView clipToBounds = NO Subviews not detected
- - (UIView*)hitTest:(CGPoint)pt withEvent:(UIEvent*)event
- {
- UIView *contentView = [self.subviews count] ? [self.subviews objectAtIndex:0] : nil;
- return [contentView hitTest:pt withEvent:event];
- }
- - (UIView )hitTest:(CGPoint)point withEvent:(UIEvent )event;
- {
- UIView *view = [super hitTest:point withEvent:event];
- for (UIView *subview in self.subviews) {
- if (view != nil &&
- view.userInteractionEnabled) break;
- CGPoint newPoint = [self convertPoint:point toView:subview];
- view = [subview hitTest:newPoint withEvent:event];
- }
- return view;
- }
Advertisement
Add Comment
Please, Sign In to add comment