Awesome channel about iOS app development
clipped() doesn’t affect hit testing – Ole Begemann The clipped() modifier in SwiftUI doesn’t limit hit testing to the clipping region. The clipped view can still receive taps/clicks outside the visible area. Add .contentShape(Rectangle()) to change this behavior.
The clipped() modifier in SwiftUI doesn’t limit hit testing to the clipping region. The clipped view can still receive taps/clicks outside the visible area. Add .contentShape(Rectangle()) to change this behavior.
clipped()
.contentShape(Rectangle())