@swmansion/react-native-bottom-sheet 0.8.3-next.1 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -443,9 +443,15 @@ public final class RNSBottomSheetHostingView: UIView {
|
|
|
443
443
|
})?.offset ?? targetIndex
|
|
444
444
|
}
|
|
445
445
|
|
|
446
|
+
private func isVerticallyScrollable(_ scrollView: UIScrollView) -> Bool {
|
|
447
|
+
let verticalInset = scrollView.adjustedContentInset.top + scrollView.adjustedContentInset.bottom
|
|
448
|
+
let visibleHeight = max(0, scrollView.bounds.height - verticalInset)
|
|
449
|
+
return scrollView.alwaysBounceVertical || scrollView.contentSize.height > visibleHeight
|
|
450
|
+
}
|
|
451
|
+
|
|
446
452
|
private func firstScrollView(in view: UIView) -> UIScrollView? {
|
|
447
453
|
for subview in view.subviews {
|
|
448
|
-
if let scrollView = subview as? UIScrollView {
|
|
454
|
+
if let scrollView = subview as? UIScrollView, isVerticallyScrollable(scrollView) {
|
|
449
455
|
return scrollView
|
|
450
456
|
}
|
|
451
457
|
if let found = firstScrollView(in: subview) {
|
package/package.json
CHANGED