새로운 콘텐츠 전체보기, 큐레이션 전체보기 - grid item alignment top으로 설정

This commit is contained in:
Yu Sung 2023-09-27 22:17:47 +09:00
parent f653667df2
commit 1e1b97e2d4
3 changed files with 10 additions and 12 deletions

View File

@ -16,13 +16,11 @@ struct ContentNewAllItemView: View {
var body: some View {
VStack(alignment: .leading, spacing: 8) {
ZStack(alignment: .topLeading) {
KFImage(URL(string: item.coverImageUrl))
.resizable()
.scaledToFill()
.frame(width: width, height: width, alignment: .top)
.cornerRadius(2.7)
}
KFImage(URL(string: item.coverImageUrl))
.resizable()
.scaledToFill()
.frame(width: width, height: width, alignment: .top)
.cornerRadius(2.7)
Text(item.title)
.font(.custom(Font.medium.rawValue, size: 13.3))
@ -47,7 +45,7 @@ struct ContentNewAllItemView: View {
}
.padding(.bottom, 10)
}
.frame(width: width, alignment: .leading)
.frame(width: width)
.onTapGesture { AppState.shared.setAppStep(step: .contentDetail(contentId: item.contentId)) }
.onAppear {
width = (screenSize().width - 40) / 2

View File

@ -12,8 +12,8 @@ struct ContentNewAllView: View {
@StateObject var viewModel = ContentNewAllViewModel()
let columns = [
GridItem(.flexible()),
GridItem(.flexible())
GridItem(.flexible(), alignment: .top),
GridItem(.flexible(), alignment: .top)
]
var body: some View {

View File

@ -15,8 +15,8 @@ struct ContentCurationView: View {
let curationId: Int
let columns = [
GridItem(.flexible()),
GridItem(.flexible())
GridItem(.flexible(), alignment: .top),
GridItem(.flexible(), alignment: .top)
]
var body: some View {