fix: NotificationCell nameLabel and actionLabel layout issue

This commit is contained in:
sunxiaojian 2021-04-15 10:53:03 +08:00
parent 56d22e9c1c
commit 845080a69d
2 changed files with 3 additions and 3 deletions

View File

@ -137,7 +137,7 @@ extension NotificationStatusTableViewCell {
actionLabel.constrain([
actionLabel.leadingAnchor.constraint(equalTo: nameLabel.trailingAnchor, constant: 4),
actionLabel.centerYAnchor.constraint(equalTo: nameLabel.centerYAnchor),
contentView.trailingAnchor.constraint(equalTo: actionLabel.trailingAnchor, constant: 4).priority(.defaultLow)
container.trailingAnchor.constraint(greaterThanOrEqualTo: actionLabel.trailingAnchor, constant: 4).priority(.defaultLow)
])
statusView.contentWarningBlurContentImageView.backgroundColor = Asset.Colors.Background.secondaryGroupedSystemBackground.color

View File

@ -111,7 +111,7 @@ extension NotificationTableViewCell {
container.addSubview(nameLabel)
nameLabel.constrain([
nameLabel.topAnchor.constraint(equalTo: container.topAnchor, constant: 24),
contentView.bottomAnchor.constraint(equalTo: nameLabel.bottomAnchor, constant: 24),
container.bottomAnchor.constraint(equalTo: nameLabel.bottomAnchor, constant: 24),
nameLabel.leadingAnchor.constraint(equalTo: container.leadingAnchor, constant: 61)
])
@ -119,7 +119,7 @@ extension NotificationTableViewCell {
actionLabel.constrain([
actionLabel.leadingAnchor.constraint(equalTo: nameLabel.trailingAnchor, constant: 4),
actionLabel.centerYAnchor.constraint(equalTo: nameLabel.centerYAnchor),
contentView.trailingAnchor.constraint(equalTo: actionLabel.trailingAnchor, constant: 4).priority(.defaultLow)
container.trailingAnchor.constraint(greaterThanOrEqualTo: actionLabel.trailingAnchor, constant: 4).priority(.defaultLow)
])
}