84669 Lernen von Personen
152542 Lernen von Personen
20005 Lernen von Personen
5487 Lernen von Personen
7821 Lernen von Personen
359900 Lernen von Personen
3350 Lernen von Personen
180660 Lernen von Personen
48569 Lernen von Personen
18603 Lernen von Personen
40936 Lernen von Personen
1549 Lernen von Personen
1183 Lernen von Personen
32909 Lernen von Personen
button添加到ScrollView上,点击效果没了。通过设置ScrollView.delaysContentTouches = NO;点击效果回来了,但是button区域的滑动ScrollView失效。因为button较多所以设置上面的那个不行 有没有好的解决办法。
认证高级PHP讲师
1、定一个UIScrollView类,重写以下方法
- (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]; }
这样就可以获取到button 的点击事件了,具体是因为什么给你个链接即看一下 链接描述
能不能在 scrollView 上放个 view
1、定一个UIScrollView类,重写以下方法
这样就可以获取到button 的点击事件了,具体是因为什么给你个链接即看一下
链接描述
能不能在 scrollView 上放个 view