ZStack1 8. [SwiftUI] VStack, HStack, ZStack 스택 VStack(수직 스택), HStack(수평 스택), ZStack(앞/뒤 스택) VStack (H,Z도 유사함) VStack(alignment: HorizontalAlignment, spacing: CGFloat?, content: () -> View) // spacing default값은 8, nil 할당 or 지우면 간격 8 적용 // content는 void -> View 함수타입. /* 클로저 문법 최적화를 통해 아래와 같은 형태로 많이 쓰는 것임. VStack { } */ HStack 예시 ZStack 예시 ( .overlay를 떠올려 보자) Stack in Stack in Stack in Stack ... 스택 안에 스택을 쌓으며 무궁무진한 조합을 만들 수 있다. // Created by To.. 2023. 4. 3. 이전 1 다음