clipped() doesn’t affect hit testing
Read OriginalThis technical article details a SwiftUI behavior where the clipped() modifier visually hides out-of-bounds content but does not restrict the view's hit-testing area. It demonstrates the issue with code examples, shows how it can make other UI elements untappable, and provides the solution using the contentShape() modifier to align hit testing with the visible bounds.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser