84669 personnes étudient
152542 personnes étudient
20005 personnes étudient
5487 personnes étudient
7821 personnes étudient
359900 personnes étudient
3350 personnes étudient
180660 personnes étudient
48569 personnes étudient
18603 personnes étudient
40936 personnes étudient
1549 personnes étudient
1183 personnes étudient
32909 personnes étudient
button添加到ScrollView上,点击效果没了。通过设置ScrollView.delaysContentTouches = NO;点击效果回来了,但是button区域的滑动ScrollView失效。因为button较多所以设置上面的那个不行 有没有好的解决办法。
认证高级PHP讲师
1. Définissez une classe UIScrollView et réécrivez les méthodes suivantes
- (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]; }
De cette façon, vous pouvez obtenir l'événement de clic du bouton. Plus précisément, je vais vous donner un lien et jeter un œil Description du lien.
Pouvez-vous mettre une vue sur scrollView
1. Définissez une classe UIScrollView et réécrivez les méthodes suivantes
De cette façon, vous pouvez obtenir l'événement de clic du bouton. Plus précisément, je vais vous donner un lien et jeter un œil
Description du lien.
Pouvez-vous mettre une vue sur scrollView