Set padding by hand (#413) (#1001)

This commit is contained in:
Nathan Mattes 2023-04-01 22:11:41 +02:00 committed by GitHub
parent b4c08bf0c8
commit 1672121675
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -91,19 +91,19 @@ extension ProfileFieldEditCollectionViewCell {
contentView.preservesSuperviewLayoutMargins = true
containerStackView.preservesSuperviewLayoutMargins = true
containerStackView.isLayoutMarginsRelativeArrangement = true
containerStackView.translatesAutoresizingMaskIntoConstraints = false
contentView.addSubview(containerStackView)
NSLayoutConstraint.activate([
containerStackView.topAnchor.constraint(equalTo: contentView.topAnchor),
containerStackView.topAnchor.constraint(equalTo: contentView.topAnchor, constant: 11),
containerStackView.leadingAnchor.constraint(equalTo: contentView.layoutMarginsGuide.leadingAnchor),
containerStackView.trailingAnchor.constraint(equalTo: contentView.layoutMarginsGuide.trailingAnchor),
containerStackView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor),
contentView.bottomAnchor.constraint(equalTo: containerStackView.bottomAnchor, constant: 11),
])
let fieldContainer = UIStackView()
fieldContainer.axis = .vertical
fieldContainer.spacing = 2
containerStackView.addArrangedSubview(fieldContainer)
fieldContainer.addArrangedSubview(keyTextField)