diff --git a/dimensionhub/Views/DetailView.swift b/dimensionhub/Views/DetailView.swift index bc5678c..455b7eb 100644 --- a/dimensionhub/Views/DetailView.swift +++ b/dimensionhub/Views/DetailView.swift @@ -80,11 +80,13 @@ struct DetailView: View { @State var detailModel = DetailModel() var body: some View { - VStack { - VStack(alignment: .leading, spacing: 15) { + VStack(alignment: .center) { + + VStack(alignment: .leading, spacing: 20) { Text(detailModel.name) - .font(.system(size: 20)) + .font(.system(size: 30)) .fontWeight(.bold) + HStack(alignment: .center, spacing: 0) { ForEach(Array(detailModel.voiceActors.enumerated()), id: \.offset) { index, actor in if index > 0 { @@ -94,9 +96,11 @@ struct DetailView: View { .font(.system(size: 16)) } Text("等") + Spacer() } } - + .background(Color.yellow) + HStack { Spacer() @@ -113,7 +117,7 @@ struct DetailView: View { } // 渠道列表 - HStack(alignment: .center) { + HStack(alignment: .center, spacing: 15) { ForEach(Array(detailModel.channels.enumerated()), id: \.offset) { idx, channel in Text(channel.name) .font(.system(size: 16)) @@ -122,6 +126,7 @@ struct DetailView: View { detailModel.toggleChannel(channelIdx: idx) } } + Spacer() } // 渠道相关的数据列表 @@ -134,7 +139,7 @@ struct DetailView: View { } placeholder: { ProgressView() } - .frame(width: 80, height: 80) + .frame(width: 90, height: 70) .overlay { Text(episode.numName) } @@ -142,12 +147,12 @@ struct DetailView: View { Text(episode.name) .lineLimit(1) } - .frame(width: 100, height: 120) + .frame(width: 90, height: 120) } } } - HStack() { + HStack(alignment: .center) { Button { print("click me") } label: { @@ -163,9 +168,14 @@ struct DetailView: View { } } + + Spacer() } + .border(Color.red) + .frame(width: 370, alignment: .center) .task { await detailModel.loadData(dramaId: 124) + print(UIScreen.main.bounds.width) } }