View adjustments

This commit is contained in:
Justin Mazzocchi 2020-12-11 16:41:37 -08:00
parent 5f240b6ed8
commit 5bb5021a69
No known key found for this signature in database
GPG key ID: E223E6937AAFB01C
2 changed files with 15 additions and 3 deletions

View file

@ -20,4 +20,10 @@ class CompositionListCell: UICollectionViewListCell {
}
}
}
override func updateConstraints() {
super.updateConstraints()
separatorLayoutGuide.trailingAnchor.constraint(equalTo: separatorLayoutGuide.leadingAnchor).isActive = true
}
}

View file

@ -58,9 +58,9 @@ private extension CompositionView {
textView.font = .preferredFont(forTextStyle: .body)
textView.textContainer.lineFragmentPadding = 0
NSLayoutConstraint.activate([
avatarImageView.widthAnchor.constraint(equalToConstant: .avatarDimension),
let constraints = [
avatarImageView.heightAnchor.constraint(equalToConstant: .avatarDimension),
avatarImageView.widthAnchor.constraint(equalToConstant: .avatarDimension),
avatarImageView.topAnchor.constraint(equalTo: readableContentGuide.topAnchor),
avatarImageView.leadingAnchor.constraint(equalTo: readableContentGuide.leadingAnchor),
avatarImageView.bottomAnchor.constraint(lessThanOrEqualTo: readableContentGuide.bottomAnchor),
@ -68,7 +68,13 @@ private extension CompositionView {
stackView.topAnchor.constraint(equalTo: readableContentGuide.topAnchor),
stackView.trailingAnchor.constraint(equalTo: readableContentGuide.trailingAnchor),
stackView.bottomAnchor.constraint(equalTo: readableContentGuide.bottomAnchor)
])
]
for constraint in constraints {
constraint.priority = .justBelowMax
}
NSLayoutConstraint.activate(constraints)
compositionConfiguration.viewModel.$identification.map(\.identity.image)
.sink { [weak self] in self?.avatarImageView.kf.setImage(with: $0) }