From 86810bb67d31570531e0e94b840d959cb0760a22 Mon Sep 17 00:00:00 2001 From: baegteun Date: Sun, 9 Jul 2023 17:47:33 +0900 Subject: [PATCH] =?UTF-8?q?:sparkles:=20::=20StackLayout,=20StackedScrollL?= =?UTF-8?q?ayout=EC=9D=98=20=EB=B0=98=ED=99=98=EA=B0=92=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/MSGLayout/MSGLayout.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sources/MSGLayout/MSGLayout.swift b/Sources/MSGLayout/MSGLayout.swift index 53248db..0ea3a6f 100644 --- a/Sources/MSGLayout/MSGLayout.swift +++ b/Sources/MSGLayout/MSGLayout.swift @@ -27,6 +27,7 @@ public struct MSGLayout { return providers } + @discardableResult public static func stackedLayout( _ root: UIView, axis: NSLayoutConstraint.Axis = .vertical, @@ -35,7 +36,7 @@ public struct MSGLayout { distribution: UIStackView.Distribution = .fill, ignoreSafeArea: Bool = false, @UIViewSubviewsBuilder _ closure: () -> [UIView] - ) { + ) -> UIStackView { root.stacked( axis, views: closure(), @@ -46,6 +47,7 @@ public struct MSGLayout { ) } + @discardableResult public static func stackedScrollLayout( _ root: UIView, axis: NSLayoutConstraint.Axis = .vertical, @@ -54,7 +56,7 @@ public struct MSGLayout { distribution: UIStackView.Distribution = .fill, ignoreSafeArea: Bool = false, @UIViewSubviewsBuilder _ closure: () -> [UIView] - ) { + ) -> StackedScrollView { root.scrollStacked( axis, views: closure(),