forked from zelo72/mastodon-ios
fix: attachment preview corner radius may missing issue
This commit is contained in:
parent
5dc0cb0cc5
commit
d0dd92789f
|
@ -93,9 +93,8 @@ extension ComposeStatusAttachmentTableViewCell {
|
|||
cell.attachmentContainerView.previewImageView.image = placeholder
|
||||
return
|
||||
}
|
||||
// cannot get correct size. set corner radius on layer
|
||||
cell.attachmentContainerView.previewImageView.image = image
|
||||
.af.imageAspectScaled(toFill: size)
|
||||
.af.imageRounded(withCornerRadius: AttachmentContainerView.containerViewCornerRadius)
|
||||
}
|
||||
.store(in: &cell.disposeBag)
|
||||
Publishers.CombineLatest(
|
||||
|
|
|
@ -19,6 +19,8 @@ final class AttachmentContainerView: UIView {
|
|||
let previewImageView: UIImageView = {
|
||||
let imageView = UIImageView()
|
||||
imageView.contentMode = .scaleAspectFill
|
||||
imageView.layer.cornerRadius = AttachmentContainerView.containerViewCornerRadius
|
||||
imageView.layer.cornerCurve = .continuous
|
||||
imageView.layer.masksToBounds = true
|
||||
return imageView
|
||||
}()
|
||||
|
|
Loading…
Reference in New Issue