1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2025-02-05 20:03:20 +01:00

fix: displayNameLabel display beyound card

This commit is contained in:
sunxiaojian 2021-04-08 14:19:59 +08:00
parent c1971438cd
commit 5c7a13e6b3

View File

@ -32,6 +32,7 @@ class SearchRecommendAccountsCollectionViewCell: UICollectionViewCell {
let displayNameLabel: UILabel = {
let label = UILabel()
label.textColor = .white
label.textAlignment = .center
label.font = .systemFont(ofSize: 18, weight: .semibold)
label.translatesAutoresizingMaskIntoConstraints = false
return label
@ -100,6 +101,8 @@ extension SearchRecommendAccountsCollectionViewCell {
contentView.addSubview(displayNameLabel)
displayNameLabel.constrain([
displayNameLabel.constraint(.top, toView: contentView, constant: 108),
displayNameLabel.constraint(.leading, toView: contentView),
displayNameLabel.constraint(.trailing, toView: contentView),
displayNameLabel.constraint(.centerX, toView: contentView)
])