scenee / FloatingPanel

A clean and easy-to-use floating panel UI component for iOS
MIT License
5.59k stars 508 forks source link

Scrollview inside floating panel not scrolling #508

Open jsood6 opened 2 years ago

jsood6 commented 2 years ago

Description

We have integrated this library into our app and are adding swiftUI views inside a hostingViewController in a scrollview inside this floating panel and it works perfectly well in iOS 14 and below but it doesn't work at all in iOS 15. Could you guys please help with that?

Expected behavior

the scrollview should scroll properly

Actual behavior

the scrollview doesn't scroll at all

Steps to reproduce

Code example that reproduces the issue just use the app in iOS 15, doesn't work. Not sure if this is a library issue or something on our end, but the fact that it works fine in iOS 14 and not in iOS 15 makes me want to double check the library!

How do you display panel(s)?

How many panels do you displays?

Environment

Library version latest

Installation method

Swift Package Manager

iOS version(s) iOS 15

Xcode version latest

@scenee

hellopandaxx commented 2 years ago

We have the similar issue. Having a UITableView inside a FloatingPanel and call track(scrollView: vc.tableView). In case I drag table slowly - it works fine: scrolling of table view and dragging the panel if needed. But if I perform some kind of quick drag e.g. swipe up-down, than inner scroll of the table becomes frozen. From this moment panel only can be hidden by tap on outer area or by drag the small rect of panel itself outside the inner VC with table. IOS 15 too.

hellopandaxx commented 2 years ago

During debug I found out that in file Core.swift in @objc func handle(panGesture: UIPanGestureRecognizer) { one of the lockScrollView() can be called without subsequent call of unlockScrollView()

Screenshot 2021-10-26 at 13 39 43

This leads to the lock of table view's scroll

jsood6 commented 2 years ago

@hellopandaxx thank you for replying promptly! So, how did you fix the scroll - did you just comment that line you highlighted? Because that file isn't editable.

hellopandaxx commented 2 years ago

@jsood6, to be honest, for the current moment I leave that thing as is. I did unlock file only for placing some prints and debug...

jsood6 commented 2 years ago

@hellopandaxx gotcha! I tried unlocking it by changing permissions to read & write but it didn't work for me, it's still locked..is there any other way that i'm missing?

hellopandaxx commented 2 years ago

@jsood6, I just placed cursor into that file, start typing and Xcode prompt me to unlock this file, I choose yes..

jsood6 commented 2 years ago

@hellopandaxx lol yeah I've done that before but this time it's not letting me do it..I'm using SPM, perhaps that's why?

hellopandaxx commented 2 years ago

@jsood6, yes, maybe 🤔 I'm using pods..

jsood6 commented 2 years ago

https://developer.apple.com/documentation/swift_packages/editing_a_package_dependency_as_a_local_package

doing this works for SPM!

jsood6 commented 2 years ago

@scenee could you help with this? Still unresolved issue!

scenee commented 2 years ago

Which app can I reproduce this issue? I tried Maps-SwiftUI example app, but I could not figure out a issue on the scroll tracking.