Closed k-lpmg closed 5 years ago
Hi @k-lpmg, thanks for bringing this to our attention and the repro steps, it was helpful in getting down to the root of the issue.
The bug is caused when the scrollView
contentSize is .zero
at the time of the webView loading the request and the panModal initialization. There are two straight forward ways to fix this:
1) Set allowsExtendedPanScrolling
to true
:
var allowsExtendedPanScrolling: Bool {
return true
}
or
2) Call PanModalSetNeedsLayoutUpdate()
once the request has finished:
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
panModalSetNeedsLayoutUpdate()
}
Hi @tun57 I applied it according to your answer and it worked. Thanks!
Description
PanScrollable of scrollView in WKWebView does not working.
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)Bug Report
Reproducible in:
PanModal version: 1.2
iOS version: 12.1
Steps to reproduce:
import PanModal
final class WebViewController: UIViewController {
}
extension WebViewController: PanModalPresentable {
}
Expected result:
PanScrollable panModal webView.
Actual result:
Height is zero.
Attachments:
Default setting.
Add longFormHeight for default height is zero. But, panScrollable is not working.
}