티스토리 뷰

📱 SwiftUI

HStack

James Wetzel 2022. 6. 10. 10:54
728x90
반응형

A view that arranges its children in a horizontal line.

var body: some View {
    HStack(
        alignment: .top,
        spacing: 10
    ) {
        ForEach(
            1...5,
            id: \.self
        ) {
            Text("Item \($0)")
        }
    }
}
728x90
반응형