-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DiffableDataSource + Compositional Layout으로 마이그레이션 #58
Changes from 1 commit
1c723f1
f4f50cc
bc73245
48740fa
45b09b9
4edc82e
1fe4ab1
8d7df71
566d14a
a251041
8f5b787
f19057b
142c69a
1d07f1d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ import DSKit | |
final class ProfileCollectionViewCell: UICollectionViewCell { | ||
private lazy var imageView: UIImageView = { | ||
let imageView = UIImageView() | ||
imageView.contentMode = .scaleAspectFit | ||
imageView.contentMode = .scaleToFill | ||
imageView.layer.masksToBounds = true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 그냥 scale보다는 AspectScale이 비율 유지할 수 있을 것 같아서 변경 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. scaleToFill 사용한 이유는 사실 이미지가 꽉 채워졌을 때를 확인하려고 썼던 거긴 해요. 고정으로 할 생각은 없었습니다. |
||
return imageView | ||
}() | ||
|
@@ -46,13 +46,7 @@ final class ProfileCollectionViewCell: UICollectionViewCell { | |
guard let url = URL(string: imageURL) else { | ||
return | ||
} | ||
let random: [DSKitImages] = [DSKitAsset.Image.Test.test1, DSKitAsset.Image.Test.test2] | ||
|
||
self.imageView.image = random.randomElement()?.image | ||
|
||
// self.imageView.setResource(url) { [weak self] in | ||
// self?.imageView.sizeToFit() | ||
// self?.imageView.layoutIfNeeded() | ||
// } | ||
self.imageView.kf.setImage(with: url) | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sampleData image는 url보니까 token이 있던데 토큰 만료될 일이 없나요? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이거 픽사베이에서 무료로 이미지 넣어 놓은 거긴한데 만료되는지는 잘 모르겠네요 |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
피그마 기준 샘플 이미지에서 여자가 앉아있는 이미지 기준으로 contentMode가 aspectFit이어야 하지 않나요?
또 scaleToFill이 맞다고 해도 scaleToAspectFill이 더 적절할 것 같아요!