오늘은 View의 일종인 LazyVGrid , LazyHGrid 를 써서 뷰를 그려보려 합니다. 이름에서 대충 짐작 하시다시피 한개만 할줄알면 나머지 한개는 똑같은 원리입니다.
그럼 먼저 LazyVGrid 를 그려보고 LazyHGrid는 어떻게 생겼는지 그림으로만 확인해볼게요. 1. LazyVGrid 사실 View 타입들은 그냥 그림으로 먼저 보는게 이해가 가장 빠릅니다.
요렇게 수직으로 배치하는 형태입니다. 이제 대충 감을 잡으셨을테니 공식문서를 볼게요. https://developer.apple.com/documentation/swiftui/lazyvgrid/ LazyVGrid | Apple Developer Documentation A container view that arranges its child views in a grid that grows vertically, creating items only as needed. developer.apple.com 그림을 한번 봤...
원문 링크 : [SiwftUI] LazyVGrid , LazyHGrid