Open jumartin opened 6 months ago
Sorry for the trouble, and thanks for the report. Just to clarify, the issue is only that the tap is registering is space outside the filled area, correct?
Yes. In both examples, the tap gesture on Android is not constrained to the shape. Thanks!
I was able to play with this a little, and while I don't have a fix yet, I do have a workaround:
CustomShape() .fill(...) .onTapGesture { ... } .clipShape(CustomShape())
That seems to work for me. Hopefully this workaround can allow you to move forward until we have a full solution!
Thanks for the workaround. It works fine indeed! 👍
skip-ui 0.6.3 is now available. If you update by using Xcode's File->Packages->Update to Latest, you should be able to remove your workaround. Please let us know if you have any issues!
Thanks. That actually worked fine until I upgrade to skip 0.8.29. Now I get weird shapes - though the tap gesture works as expected without the workaround.
Expected result (iOS)
Android (skip 0.8.29 / skip-ui 0.6.3)
Well that's not good! Do you mind posting the code you're drawing with? I'll work on it tonight
I'll have the fix ready within a day. For now you should be able to get the shapes back to normal by inserting a .id(
Thanks. If I add .id("shape\(n)")
, shapes are indeed back to normal, but then the tap gesture is not working properly again (unless I add the .clipShape(...)
workaround).
Yes, that's as expected. I'll have a proper fix for you by the end of today. Sorry for the trouble!
OK I've just pushed 0.6.4
It should fix the issue. And I've added additional information to the Gestures section of the SkipUI README with its limitations: https://github.com/skiptools/skip-ui/blob/main/README.md#gestures
Pease let us know if you have any issues or additional requests!
Great, thanks!
This is fine on iOS but not on Android (skip 0.8.28 / skip-ui 0.6.2) :
It is the same with Path - on Android the message is logged even when tapping outside the shape :