Skip to content

Instantly share code, notes, and snippets.

@maxamly
maxamly / TappableContentView.swift
Created March 20, 2025 07:39 — forked from danhalliday/TappableContentView.swift
SwiftUI solution for responsive, instantly-tappable tiles in a scroll view.
import SwiftUI
/// SwiftUI implementation of a responsive-feeling scrollview with tappable tiles.
/// We use a custom UIScrollView via UIViewRepresentable and a UIView tap overlay to
/// get around current SwiftUI issues with simultaneous gesture recognition and allow
/// the tiles to respond instantly to presses while scrolling.
struct ContentView: View {
@State private var showSheet = false