Skip to content

Commit

Permalink
✨ :: StackLayout, StackedScrollLayout의 반환값 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
baekteun committed Jul 9, 2023
1 parent ee41eba commit 86810bb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Sources/MSGLayout/MSGLayout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public struct MSGLayout {
return providers
}

@discardableResult
public static func stackedLayout(
_ root: UIView,
axis: NSLayoutConstraint.Axis = .vertical,
Expand All @@ -35,7 +36,7 @@ public struct MSGLayout {
distribution: UIStackView.Distribution = .fill,
ignoreSafeArea: Bool = false,
@UIViewSubviewsBuilder _ closure: () -> [UIView]
) {
) -> UIStackView {
root.stacked(
axis,
views: closure(),
Expand All @@ -46,6 +47,7 @@ public struct MSGLayout {
)
}

@discardableResult
public static func stackedScrollLayout(
_ root: UIView,
axis: NSLayoutConstraint.Axis = .vertical,
Expand All @@ -54,7 +56,7 @@ public struct MSGLayout {
distribution: UIStackView.Distribution = .fill,
ignoreSafeArea: Bool = false,
@UIViewSubviewsBuilder _ closure: () -> [UIView]
) {
) -> StackedScrollView {
root.scrollStacked(
axis,
views: closure(),
Expand Down

0 comments on commit 86810bb

Please sign in to comment.