[英]StarRating inside scroll view
I am using RatingView
library for implementing the star rating in my app, but the delegate
method when rating is changed is not called. 我正在使用RatingView
库在我的应用中实施星级评分,但是未更改评分更改时的delegate
方法。
My rating view is inside a UIScrollView
, when the rating view is taken outside the UIScrollView
,the delegate is called when rating is changed. 我的评级视图位于UIScrollView
,当评级视图位于UIScrollView
之外时,更改评级时将调用委托。
I have tried EDStarRating
also but same issue. 我也尝试过EDStarRating
但是同样的问题。
Any Fix ? 有解决办法吗?
Have a look at the implementation of RatingView
. 看一下RatingView
的实现。 It is implemented with an UIGestureRecognizer
. 它由UIGestureRecognizer
实现。
The scrollview also has a UIGestureRecognizer which conflicts. 滚动视图还具有一个冲突的UIGestureRecognizer。 You can solve your problem by overriding this method and returning YES: 您可以通过重写此方法并返回YES来解决您的问题:
gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:
Also here is a SO Thread which covers using multiple UIGestureRecognizers: Simultaneous gesture recognizers in Iphone SDK 这里还有一个SO线程,其中涵盖了使用多个UIGestureRecognizers: Iphone SDK中的同时手势识别器
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.