Skip to content

Commit

Permalink
Set hugging priority and compression resistance of post button to req…
Browse files Browse the repository at this point in the history
…uired (#2066)
  • Loading branch information
ifosli authored May 23, 2024
1 parent 403a353 commit 461ae04
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ final class CommentInputContainerView: UIView {

private func setupConstraints() {
NSLayoutConstraint.activate([
self.postButton.heightAnchor.constraint(equalToConstant: Layout.Button.height),
self.postButton.widthAnchor.constraint(lessThanOrEqualTo: self.widthAnchor, multiplier: 0.25)
self.postButton.heightAnchor.constraint(equalToConstant: Layout.Button.height)
])

self.postButton.setContentCompressionResistancePriority(.required, for: .horizontal)
self.postButton.setContentHuggingPriority(.required, for: .horizontal)
}

// MARK: - Styles
Expand Down

0 comments on commit 461ae04

Please sign in to comment.