2
2
mirror of https://github.com/mastodon/mastodon-ios synced 2025-04-11 22:58:02 +02:00

fix: acctLabel display beyound card

This commit is contained in:
sunxiaojian 2021-04-08 14:17:57 +08:00
parent cc4290385d
commit c1971438cd

@ -41,6 +41,7 @@ class SearchRecommendAccountsCollectionViewCell: UICollectionViewCell {
let label = UILabel()
label.textColor = .white
label.font = .preferredFont(forTextStyle: .body)
label.textAlignment = .center
label.translatesAutoresizingMaskIntoConstraints = false
return label
}()
@ -105,6 +106,8 @@ extension SearchRecommendAccountsCollectionViewCell {
contentView.addSubview(acctLabel)
acctLabel.constrain([
acctLabel.constraint(.top, toView: contentView, constant: 132),
acctLabel.constraint(.leading, toView: contentView),
acctLabel.constraint(.trailing, toView: contentView),
acctLabel.constraint(.centerX, toView: contentView)
])