라이브 중 전체보기
- 그리드 아이템 사이 간격 수정
This commit is contained in:
@@ -13,6 +13,14 @@ struct LiveNowAllView: View {
|
||||
@StateObject var viewModel = LiveViewModel()
|
||||
@StateObject var liveAllViewModel = LiveAllViewModel()
|
||||
|
||||
let columns = [
|
||||
GridItem(.flexible(), alignment: .top),
|
||||
GridItem(.flexible(), alignment: .top),
|
||||
GridItem(.flexible(), alignment: .top)
|
||||
]
|
||||
|
||||
let spacing: CGFloat = 13.3
|
||||
|
||||
let onClickParticipant: (Int) -> Void
|
||||
|
||||
var body: some View {
|
||||
@@ -29,11 +37,11 @@ struct LiveNowAllView: View {
|
||||
viewModel.getLiveNowList()
|
||||
},
|
||||
content: {
|
||||
VStack(spacing: 13.3) {
|
||||
LazyVGrid(columns: columns, spacing: spacing) {
|
||||
ForEach(0..<viewModel.liveNowItems.count, id: \.self) { index in
|
||||
let item = viewModel.liveNowItems[index]
|
||||
|
||||
LiveNowAllItemView(item: item)
|
||||
LiveNowAllItemView(item: item, itemWidth: (screenSize().width - (spacing * (CGFloat(columns.count + 1)))) / 3)
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture {
|
||||
self.liveAllViewModel.selectedRoomId = item.roomId
|
||||
|
||||
Reference in New Issue
Block a user