У меня сейчас проблема с SwiftUI, когда я добавляю «Grid» ( Github URL ) в список, он покрывается следующей ячейкой. Но когда я раскрываю «Текст», ячейка становится больше.
List(0 ..< colorArray.count) { i in
VStack(alignment: .leading, spacing: 8) {
Text("a")
.font(.body)
.multilineTextAlignment(.leading)
.padding(.horizontal, 10)
.lineLimit(nil)
Grid {
ForEach(self.colorArray[i], id: \.self) { color in
RoundedRectangle(cornerRadius: 10)
.foregroundColor(Color(color))
.frame(width: 80.0, height:80.0)
.overlay(
RoundedRectangle(cornerRadius: 10)
.stroke(Color(UIColor.label),
lineWidth: 0.5)
)
}
}
.padding(.horizontal, 8)
.gridStyle(
AutoColumnsGridStyle(minItemWidth: 80, itemHeight: 80, hSpacing: 8, vSpacing: 8)
)
}
}
Как мне сделать так, чтобы «Сетка» не покрывалась, как на картинке ниже. 