1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2024-12-24 16:01:52 +01:00

chore: add spacing for title and button. resolve #225

This commit is contained in:
CMK 2021-08-05 16:34:37 +08:00
parent a95bd7c732
commit 6ee38d7d11

View File

@ -64,18 +64,15 @@ extension SearchRecommendCollectionHeader {
]) ])
let horizontalStackView = UIStackView() let horizontalStackView = UIStackView()
horizontalStackView.spacing = 8
horizontalStackView.axis = .horizontal horizontalStackView.axis = .horizontal
horizontalStackView.alignment = .center horizontalStackView.alignment = .center
horizontalStackView.translatesAutoresizingMaskIntoConstraints = false
horizontalStackView.distribution = .fill horizontalStackView.distribution = .fill
titleLabel.translatesAutoresizingMaskIntoConstraints = false
titleLabel.setContentHuggingPriority(.defaultLow - 1, for: .horizontal) titleLabel.setContentHuggingPriority(.defaultLow - 1, for: .horizontal)
horizontalStackView.addArrangedSubview(titleLabel) horizontalStackView.addArrangedSubview(titleLabel)
seeAllButton.translatesAutoresizingMaskIntoConstraints = false
horizontalStackView.addArrangedSubview(seeAllButton) horizontalStackView.addArrangedSubview(seeAllButton)
containerStackView.addArrangedSubview(horizontalStackView) containerStackView.addArrangedSubview(horizontalStackView)
descriptionLabel.translatesAutoresizingMaskIntoConstraints = false
containerStackView.addArrangedSubview(descriptionLabel) containerStackView.addArrangedSubview(descriptionLabel)
} }