Cosmos: CosmosView not updating to touch events in ScrollView

I have a ScrollView -> View -> CosmosView. All UserInteractionEnabled properties are ON. I can change the rating on the stars by swiping easily, but tapping on them is very hard. Maybe is because the tap events are not well handled here, i don’t know, but all config of the scrollview and view are by default. Any help? https://s10.postimg.org/nkklw7rrd/Screen_Shot_2016_08_09_at_11_24_29_AM.png

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 24 (12 by maintainers)

Most upvoted comments

@iverde, thanks for reporting. It looks like your issue with the frame size was similar to the one that was fixed today in version 10. There should be no need to update the frame size manually from now on. πŸ˜ƒ

Oops my bad then thanks @NiyogRay for spotting that πŸ˜ƒ

Hello ! First, thanks for this amazing tool ! I just had the same issue and thank god I found this thread.

Just wanted to add a little detail is that when devloping views in code, without storyboards, then scrollView.delaysContentTouches is false by default. Thankfully I saw @evgenyneu screenshot I tried this setting πŸ˜ƒ

So the fix (in code) is:

scrollView.canCancelContentTouches = false
scrollView.delaysContentTouches = false

Cheers,

@ankraft, you are right. It looks like, once you start scrolling, the scroll view does not pass touches to its subviews and CosmosView does not receive them. I managed to make it work by disabling Cancellable Content Touches for the scroll view. This has a side effect, unfortunately. If you start interacting with CosmosView you can not longer scroll until you finish changing the rating.

cosmos_scroll_view_cancellable_content_touches

Here is the demo app.

UsingCosmosInScrollView.zip

Let me know if it works for you.