From 3155d8910a0cc877108144552e2c8f4bc3d3d555 Mon Sep 17 00:00:00 2001 From: Christopher Fuller Date: Sat, 24 Feb 2024 08:30:06 -0800 Subject: [PATCH] Reorder size methods --- Sources/Layout/LayoutItem.swift | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Sources/Layout/LayoutItem.swift b/Sources/Layout/LayoutItem.swift index cd746708..58025c36 100644 --- a/Sources/Layout/LayoutItem.swift +++ b/Sources/Layout/LayoutItem.swift @@ -114,34 +114,34 @@ extension LayoutItem { /// Adds constraints defining the size of the ``layoutItemView``. /// /// - Parameters: - /// - width: The width value. - /// - height: The height value. + /// - size: The size value. /// - priority: The priority of the constraints. /// /// - Returns: The layout item instance with the added constraints. public func size( - width: CGFloat, - height: CGFloat, + _ size: CGSize, priority: UILayoutPriority = .required ) -> LayoutItem { addingSuperviewConstraints { layoutItem in - layoutItem.layoutItemView.sizeConstraints(width: width, height: height).withPriority(priority) + layoutItem.layoutItemView.sizeConstraints(size).withPriority(priority) } } /// Adds constraints defining the size of the ``layoutItemView``. /// /// - Parameters: - /// - size: The size value. + /// - width: The width value. + /// - height: The height value. /// - priority: The priority of the constraints. /// /// - Returns: The layout item instance with the added constraints. public func size( - _ size: CGSize, + width: CGFloat, + height: CGFloat, priority: UILayoutPriority = .required ) -> LayoutItem { addingSuperviewConstraints { layoutItem in - layoutItem.layoutItemView.sizeConstraints(size).withPriority(priority) + layoutItem.layoutItemView.sizeConstraints(width: width, height: height).withPriority(priority) } }