Compose SwiftUIv0.4.0
esc
GuideAPIGitHub
View modifier

contentShape(_:)

Sets the shape used for hit testing.

iOS 17.0+macOS 14.0+tvOS 17.0+watchOS 10.0+
fun Modifier.contentShape(shape: Shape, eoFill: Boolean = false): Modifier

Overview

Modifier.contentShape(shape = Shape.…)

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

nonisolated func contentShape<S>(_ shape: S, eoFill: Bool = false) -> some View where S : Shape

Topics

Overloads

fun Modifier.contentShape(kind: ContentShapeKinds, shape: Shape, eoFill: Boolean = false): Modifier
SwiftUI View.contentShape(_:_:eoFill:)
fun Modifier.contentShape(shape: Shape, eoFill: Boolean = false): Modifier
SwiftUI View.contentShape(_:eoFill:)