Skip to content

Commit 3772911

Browse files
committed
Update package
1 parent 9cf2c3b commit 3772911

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

Sources/Intermodular/Helpers/UIKit/UIHostingScrollView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ open class UIHostingScrollView<Content: View>: UIScrollView, _opaque_UIHostingSc
8989

9090
open override func layoutSubviews() {
9191
super.layoutSubviews()
92+
9293
update()
9394
}
9495

@@ -134,8 +135,7 @@ open class UIHostingScrollView<Content: View>: UIScrollView, _opaque_UIHostingSc
134135

135136
hostingContentView.setNeedsDisplay()
136137
hostingContentView.setNeedsLayout()
137-
hostingContentView.layoutIfNeeded()
138-
138+
139139
if configuration.axes == .vertical {
140140
if contentHuggingPriority(for: .horizontal) != .defaultHigh {
141141
setContentHuggingPriority(.defaultHigh, for: .horizontal)

Sources/Intramodular/Scrolling/CocoaScrollView.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,13 @@ extension CocoaScrollView {
7474
/// Adds a condition whether for whether the collection view disables bouncing when scrolling reaches the end of the content
7575
public func scrollBounceDisabled(_ disabled: Bool) -> Self {
7676
then {
77-
$0.configuration.alwaysBounceHorizontal = !disabled
78-
$0.configuration.alwaysBounceVertical = !disabled
77+
if $0.configuration.axes.contains(.horizontal) {
78+
$0.configuration.alwaysBounceHorizontal = !disabled
79+
}
80+
81+
if $0.configuration.axes.contains(.vertical) {
82+
$0.configuration.alwaysBounceVertical = !disabled
83+
}
7984
}
8085
}
8186

0 commit comments

Comments
 (0)