KFImage를 이용하여 불러오는 이미지 다운샘플링
This commit is contained in:
@@ -47,6 +47,13 @@ struct ContentCreateSelectThemeView: View {
|
||||
ForEach(viewModel.themes, id: \.self) { theme in
|
||||
VStack(spacing: 16.7) {
|
||||
KFImage(URL(string: theme.image))
|
||||
.cancelOnDisappear(true)
|
||||
.downsampling(
|
||||
size: CGSize(
|
||||
width: 60,
|
||||
height: 60
|
||||
)
|
||||
)
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: 60, height: 60, alignment: .top)
|
||||
|
@@ -143,6 +143,13 @@ struct ContentCreateView: View {
|
||||
HStack(spacing: 13.3) {
|
||||
if let theme = viewModel.theme {
|
||||
KFImage(URL(string: theme.image))
|
||||
.cancelOnDisappear(true)
|
||||
.downsampling(
|
||||
size: CGSize(
|
||||
width: 33.3,
|
||||
height: 33.3
|
||||
)
|
||||
)
|
||||
.resizable()
|
||||
.frame(width: 33.3, height: 33.3)
|
||||
.clipShape(Circle())
|
||||
|
Reference in New Issue
Block a user