We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
屏幕中间的view可以点击,两侧的View不能点击,我看了代码好像是超出父类的范围
The text was updated successfully, but these errors were encountered:
更改项目里- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event;
(UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { if ([self pointInside:point withEvent:event]) { CGPoint newPoint = CGPointZero; newPoint.x = point.x - _scrollView.frame.origin.x + _scrollView.contentOffset.x; newPoint.y = point.y - _scrollView.frame.origin.y + _scrollView.contentOffset.y;
if ([_scrollView pointInside:newPoint withEvent:event]) { return [_scrollView hitTest:newPoint withEvent:event]; } for (PGIndexBannerSubiew *view in _scrollView.subviews) { if (CGRectContainsPoint(view.frame, newPoint)) { return view; }
} return _scrollView; }
return nil; }
Sorry, something went wrong.
按照这种方法设置过后点击侧边的View,滑动到对应的View且居中会出现Bug。
No branches or pull requests
屏幕中间的view可以点击,两侧的View不能点击,我看了代码好像是超出父类的范围
The text was updated successfully, but these errors were encountered: