Skip to content

Commit c3f00b0

Browse files
committed
Update support for horizontal
1 parent 71d64de commit c3f00b0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

StackScrollView/StackScrollView.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,16 @@ open class StackScrollView: UICollectionView, UICollectionViewDataSource, UIColl
8383
private func setup() {
8484

8585
backgroundColor = .white
86+
87+
switch direction {
88+
case .vertical:
89+
alwaysBounceVertical = true
90+
case .horizontal:
91+
alwaysBounceHorizontal = true
92+
@unknown default:
93+
fatalError()
94+
}
8695

87-
alwaysBounceVertical = true
8896
delaysContentTouches = false
8997
keyboardDismissMode = .interactive
9098
backgroundColor = .clear

0 commit comments

Comments
 (0)