mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-14 04:21:01 +00:00
View adjustments
This commit is contained in:
parent
5f240b6ed8
commit
5bb5021a69
2 changed files with 15 additions and 3 deletions
|
@ -20,4 +20,10 @@ class CompositionListCell: UICollectionViewListCell {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
override func updateConstraints() {
|
||||
super.updateConstraints()
|
||||
|
||||
separatorLayoutGuide.trailingAnchor.constraint(equalTo: separatorLayoutGuide.leadingAnchor).isActive = true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) }
|
||||
|
|
Loading…
Reference in a new issue