Skip to content

Commit 11446c0

Browse files
committed
Move result builder parameter to end to allow for trailing closures
1 parent 730dd47 commit 11446c0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Paralayout/UIView+Spreading.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,18 @@ extension UIView {
7777
/// the space required for the specified `margin` between each subview. In other words, the `subviews` may each have
7878
/// a size of zero along the horizontal axis, but their size may not be negative.
7979
///
80-
/// - parameter subviews: The subviews to spread out, ordered from the leading edge to the trailing edge of the
81-
/// receiver.
8280
/// - parameter margin: The space between each subview.
8381
/// - parameter bounds: A custom area within which to layout the subviews in the receiver's coordinate space, or
8482
/// `nil` to use the receiver's `bounds`. Defaults to `nil`.
8583
/// - parameter orthogonalBehavior: Controls how the view should be sized and positioned along the vertical axis.
8684
/// Defaults to filling the vertical space of the `bounds`.
85+
/// - parameter subviews: The subviews to spread out, ordered from the leading edge to the trailing edge of the
86+
/// receiver.
8787
public func horizontallySpreadSubviews(
88-
@ViewArrayBuilder _ subviews: () -> [UIView],
8988
margin: CGFloat,
9089
inRect bounds: CGRect? = nil,
91-
orthogonalBehavior: VerticalSpreadingBehavior = .fill
90+
orthogonalBehavior: VerticalSpreadingBehavior = .fill,
91+
@ViewArrayBuilder _ subviews: () -> [UIView]
9292
) {
9393
horizontallySpreadSubviews(
9494
subviews(),
@@ -152,17 +152,17 @@ extension UIView {
152152
/// the space required for the specified `margin` between each subview. In other words, the `subviews` may each have
153153
/// a size of zero along the vertical axis, but their size may not be negative.
154154
///
155-
/// - parameter subviews: The subviews to spread out, ordered from the top edge to the bottom edge of the receiver.
156155
/// - parameter margin: The space between each subview.
157156
/// - parameter bounds: A custom area within which to layout the subviews in the receiver's coordinate space, or
158157
/// `nil` to use the receiver's `bounds`. Defaults to `nil`.
159158
/// - parameter orthogonalBehavior: Controls how the view should be sized and positioned along the horizontal axis.
160159
/// Defaults to filling the horizontal space of the `bounds`.
160+
/// - parameter subviews: The subviews to spread out, ordered from the top edge to the bottom edge of the receiver.
161161
public func verticallySpreadSubviews(
162-
@ViewArrayBuilder _ subviews: () -> [UIView],
163162
margin: CGFloat,
164163
inRect bounds: CGRect? = nil,
165-
orthogonalBehavior: HorizontalSpreadingBehavior = .fill
164+
orthogonalBehavior: HorizontalSpreadingBehavior = .fill,
165+
@ViewArrayBuilder _ subviews: () -> [UIView]
166166
) {
167167
verticallySpreadSubviews(
168168
subviews(),

0 commit comments

Comments
 (0)