Skip to content

Commit

Permalink
Call aspect ratio in square constraint method (#329)
Browse files Browse the repository at this point in the history
  • Loading branch information
tinder-cfuller authored Feb 5, 2024
1 parent 1897f09 commit 85e6aa7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Layout/UIKit/UIView+AutoLayout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ extension UIView {
///
/// - Returns: The created constraint.
public func squareConstraint() -> NSLayoutConstraint {
constraint(for: .width, to: .height, of: self)
aspectRatioConstraint(1)
}

// MARK: - Aspect Ratio
Expand Down

0 comments on commit 85e6aa7

Please sign in to comment.