aheze / SwipeActions

Add customizable swipe actions to any view.

Home Page:https://twitter.com/aheze0/status/1646399867764510721

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SwipeAction has some unknown minimum corner radius

joshgalvan opened this issue · comments

Trying to make a SwipeView and SwipeAction that both have a corner radius less than about 18 makes the SwipeView have a smaller corner radius than the Swipe Action. I want a corner radius of 12, but I am not able to because the swipeActionCornerRadius() modifier doesn't do anything below values of around 18.

    var body: some View {
        SwipeView {
            Text("Hello")
                .frame(maxWidth: .infinity)
                .padding(.vertical, 20)
                .background(Color.blue.opacity(0.1))
                .cornerRadius(12)
        } trailingActions: { _ in
            SwipeAction("World") {
                print("Tapped!")
            }
        }
        .swipeActionCornerRadius(12)
    }

Screenshot 2023-06-06 at 5 03 12 PM