Color 결정 시점
body의 리턴 타입 → 단일이 아닌 여러 컴포넌트도 가능한 이유?
VStack으로 자동 인식하는 건가?
struct ContentView: View {
var body: some View {
Text("test")
RoundedRectangle(cornerRadius: 20.0)
}
}
@resultBuilder
struct ViewBuilder
static func buildBlock<each Content>(_ content: repeat each Content) -> TupleView<(repeat each Content)> where repeat each Content : View
개발할 때 State 쓰시나요?
→ State를 사용하는 경우는?
상태 변화를 단순 뷰에서만 처리할때 ex. 스크롤뷰의 offset을 관리할 때