Skip to content

Conversation

VislovIvan
Copy link
Collaborator

@VislovIvan VislovIvan commented Jun 19, 2025

Changes

  1. Problem: Border clipping
    Prevents half the border from being clipped by drawing the line inside the shape:
    .strokeBorder() instead of .stroke()

  2. Problem: Taps don’t register on transparent areas
    Adding .contentShape(.rect) makes transparent regions tappable.

  3. Problem: Taps on child views trigger the card’s tap handler
    With isTappable enabled, any touch inside the card, including taps on buttons or checkboxes, still fires the card’s own tap action. Subviews should handle their taps independently.

SwiftUI fix:
Replaced the .simultaneousGesture() with .gesture(DragGesture(minimumDistance: 0.0)...)

@mikhailChelbaev mikhailChelbaev changed the title Improve Card hit-testing and border rendering in SUCard & UKCard Improve Card hit-testing and border rendering in SUCard Jun 20, 2025
@mikhailChelbaev mikhailChelbaev merged commit b582cb9 into main Jun 20, 2025
1 check passed
@mikhailChelbaev mikhailChelbaev deleted the card-bug-fix branch June 20, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants