Skip to content

Commit

Permalink
Reorder square method (#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
tinder-cfuller authored Jan 31, 2024
1 parent 71de554 commit d66051a
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Sources/Layout/LayoutItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,7 @@ extension LayoutItem {
}
}

// MARK: - Aspect Ratio

/// Adds a constraint defining a square aspect ratio for the ``layoutItemView``.
///
/// - Returns: The layout item instance with the added constraint.
public func square() -> LayoutItem {
aspectRatio(1)
}
// MARK: - Square

/// Adds constraints defining the width and height of the ``layoutItemView`` to be the given length.
///
Expand All @@ -238,6 +231,15 @@ extension LayoutItem {
}
}

/// Adds a constraint defining a square aspect ratio for the ``layoutItemView``.
///
/// - Returns: The layout item instance with the added constraint.
public func square() -> LayoutItem {
aspectRatio(1)
}

// MARK: - Aspect Ratio

/// Adds a constraint defining the ratio of the width to the height of the ``layoutItemView``.
///
/// - Parameters:
Expand Down

0 comments on commit d66051a

Please sign in to comment.