horizontalSizeClass (make size different layout)
·
SwiftUI
import SwiftUIstruct ContentView: View { @Environment(\.horizontalSizeClass) var horizontalClass var body: some View { Group { if horizontalClass == .compact { VStack(spacing: 0) { HeaderView(isCompact: true) BodyView() } } else { HStack(spacing: 0) { HeaderView(isCompact: false) Bod..
ytw_developer
'horizontalsizeclass' 태그의 글 목록