Compose SwiftUIv0.4.0
esc
GuideAPIGitHub
View modifier

fixedSize(_:)

Keeps a view at its ideal size instead of the proposed one.

iOS 17.0+macOS 14.0+tvOS 17.0+watchOS 10.0+
fun Modifier.fixedSize(): Modifier

Overview

Modifier.fixedSize()

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

@export(implementation) nonisolated func fixedSize() -> some View

Topics

Overloads

fun Modifier.fixedSize(): Modifier
SwiftUI View.fixedSize()
fun Modifier.fixedSize(horizontal: Boolean, vertical: Boolean): Modifier
SwiftUI View.fixedSize(horizontal:vertical:)