File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Sources/StackKit/Stacks/Scroll Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -38,13 +38,9 @@ open class ScrollViewBuilder: UIView {
3838 if axis == . vertical {
3939 stackView. axis = . vertical
4040 stackView. distribution = . equalSpacing
41- scrollView. alwaysBounceVertical = true
42- scrollView. alwaysBounceHorizontal = false
4341 stackView. widthAnchor. constraint ( equalTo: scrollView. widthAnchor) . isActive = true
4442
4543 } else {
46- scrollView. alwaysBounceVertical = false
47- scrollView. alwaysBounceHorizontal = true
4844 stackView. axis = . horizontal
4945 stackView. distribution = . fillEqually
5046 stackView. alignment = . center
@@ -101,6 +97,18 @@ public extension ScrollViewBuilder {
10197 return self
10298 }
10399
100+ @discardableResult
101+ func alwaysBounceHorizontal( _ value: Bool ) -> Self {
102+ scrollView. alwaysBounceHorizontal = value
103+ return self
104+ }
105+
106+ @discardableResult
107+ func alwaysBounceVertical( _ value: Bool ) -> Self {
108+ scrollView. alwaysBounceVertical = value
109+ return self
110+ }
111+
104112 @discardableResult
105113 func scrollDelegate( _ delegate: UIScrollViewDelegate ) -> Self {
106114 scrollView. delegate = delegate
You can’t perform that action at this time.
0 commit comments