Compose SwiftUIv0.4.0
esc
GuideAPIGitHub
View modifier

allowsHitTesting(_:)

A view modifier that maps SwiftUI's allowsHitTesting.

iOS 17.0+macOS 14.0+tvOS 17.0+watchOS 10.0+
fun Modifier.allowsHitTesting(enabled: Boolean): Modifier

Overview

Modifier.allowsHitTesting(enabled = true)

This is the Kotlin form of SwiftUI View.allowsHitTesting(_:): SwiftUI documentation. In Swift it reads:

nonisolated func allowsHitTesting(_ enabled: Bool) -> some View

Topics

Overloads

fun Modifier.allowsHitTesting(enabled: Boolean): Modifier
SwiftUI View.allowsHitTesting(_:)