84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
button添加到ScrollView上,点击效果没了。通过设置ScrollView.delaysContentTouches = NO;点击效果回来了,但是button区域的滑动ScrollView失效。因为button较多所以设置上面的那个不行 有没有好的解决办法。
认证高级PHP讲师
1. Define a UIScrollView class and rewrite the following methods
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [[self nextResponder] touchesBegan:touches withEvent:event]; [super touchesBegan:touches withEvent:event]; } -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { [[self nextResponder] touchesMoved:touches withEvent:event]; [super touchesMoved:touches withEvent:event]; } - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { [[self nextResponder] touchesEnded:touches withEvent:event]; [super touchesEnded:touches withEvent:event]; }
In this way, you can get the click event of the button. I will give you a link to take a look at the specific reason. Link description
Can you put a view on the scrollView
1. Define a UIScrollView class and rewrite the following methods
In this way, you can get the click event of the button. I will give you a link to take a look at the specific reason.
Link description
Can you put a view on the scrollView