Compose SwiftUIv0.4.0
esc
GuideAPIGitHub
View modifier

offset(_:)

Moves a view without changing its layout.

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

Overview

Modifier.offset(offset = CGSize.…)

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

nonisolated func offset(_ offset: CGSize) -> some View

Topics

Overloads

fun Modifier.offset(x: Double = 0.0, y: Double = 0.0): Modifier
SwiftUI View.offset(x:y:)
fun Modifier.offset(offset: CGSize): Modifier
SwiftUI View.offset(_:)