Files
SodaLive
Preview Content
Resources
Sources
Agora
App
Audition
Applicant
Detail
Role
Vote
AuditionApi.swift
AuditionItemView.swift
AuditionRepository.swift
AuditionView.swift
AuditionViewModel.swift
GetAuditionListResponse.swift
Common
Content
CustomView
Debug
Dialog
Explorer
Extensions
Follow
Font
FortuneWheel
IAP
ImagePicker
Keyboard
Live
Main
Message
MyPage
NavigationBar
Onboarding
Report
SearchChannel
Settings
Shape
Splash
UI
User
Utils
ContentView.swift
SodaLive.entitlements
SodaLive.xcworkspace
generated
.gitignore
Podfile
Podfile.lock
SodaLive-dev.entitlements
model-SodaLive-dev.json
model-SodaLive.json
sodalive-ios/SodaLive/Sources/Audition/AuditionItemView.swift
2025-01-06 18:31:49 +09:00

52 lines
1.4 KiB
Swift

//
// AuditionItemView.swift
// SodaLive
//
// Created by klaus on 1/6/25.
//
import SwiftUI
import Kingfisher
struct AuditionItemView: View {
let item: GetAuditionListItem
var body: some View {
VStack(alignment: .leading, spacing: 10) {
ZStack {
KFImage(URL(string: item.imageUrl))
.cancelOnDisappear(true)
.downsampling(size: CGSize(width: 1000, height: 530))
.resizable()
.aspectRatio(1000/530, contentMode: .fit)
.frame(maxWidth: .infinity)
.cornerRadius(6.7)
.overlay(
Color.black
.cornerRadius(6.7)
.opacity(item.isOff ? 0.7 : 0.0)
)
}
.frame(maxWidth: .infinity)
Text(item.title)
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(Color.grayee)
.lineLimit(1)
.truncationMode(.tail)
}
}
}
#Preview {
AuditionItemView(
item: GetAuditionListItem(
id: 1,
title: "[원작] 성인식",
imageUrl: "https://test-cf.sodalive.net/audition/production/3/audition-aa934579-c01a-4da2-89fd-cce70d51c612-4267-1735908116928",
isOff: false
)
)
}