There is an extra safe area scroll for table view
Zeynal7 opened this issue · comments
Description
When I try to scroll the table view, it has extra scroll at the bottom. I checked its height and it is 34 pixel which matches safe area.
I have tried the following, but none of them worked
tableView.insetsContentViewsToSafeArea = false
tableView.contentInsetAdjustmentBehavior = .never
set header and footer height to 0
Expected behavior
Scroll should stop when end of content is reached
Actual behavior
Scroll continues for extra 34 pixels.
Steps to reproduce
Code example that reproduces the issue
I have updated one of the samples - AdaptiveLayoutTestViewController
- https://github.com/Zeynal7/FloatingPanelDemo
Screen.Recording.2023-08-28.at.14.04.17.mov
Environment
Library version
Installation method
Version 2.7.0 with SPM
iOS version(s)
Tested on 16.4 and 17.0
Only reproducible with devices that have safe area
Xcode version
14.3
This issue can be resolved by applying this patch.
diff --git a/Examples/Samples/Sources/UseCases/UseCaseController.swift b/Examples/Samples/Sources/UseCases/UseCaseController.swift
index a8fd6f6..62f39a6 100644
--- a/Examples/Samples/Sources/UseCases/UseCaseController.swift
+++ b/Examples/Samples/Sources/UseCases/UseCaseController.swift
@@ -248,7 +248,7 @@ extension UseCaseController {
case .showAdaptivePanelWithCustomGuide:
let fpc = FloatingPanelController()
fpc.isRemovalInteractionEnabled = true
- fpc.contentInsetAdjustmentBehavior = .always
+ fpc.contentInsetAdjustmentBehavior = .never
fpc.surfaceView.appearance = {
let appearance = SurfaceAppearance()
appearance.cornerRadius = 6.0
This is because FloatingPanelController automatically sets a content inset as its safe area if fpc.contentInsetAdjustmentBehavior
is set to .always
:)
I see. Thank you.