Open hamdshah opened 4 years ago
Try setting alwaysBounceVertical to true on your tableView π Looks like the content on the iPhone 8 isn't tall enough to enable scrolling.
Hey guys! I faced just the same issue, and setting alwaysBounceVertical
to true doesn't help.
A bit more details:
panScrollable
from PanModalPresentable
protocol to my scroll view.panScrollable
back to nil
, scroll starts working once again, but in this case, it's really hard to dismiss the card, because it takes almost the full screen.Any suggestions are appreciated πππ
Bump.
@ste57 @TosinAF -- The issue is not one off. I currently have implemented PanModalPresentable
, and I get it to work with a table view for larger iPhones, but the iPhone SE does not work. The entire table view does not allow for any scrolling on the iPhone SE. Would greatly appreciate any help
Same here!
@abdulazizSi @demon9733 @hamdshah
I figured out a fix that worked for me. I had the short form height the same as the long form height. Try this method out and report back.
func shouldPrioritize(panModalGestureRecognizer: UIPanGestureRecognizer) -> Bool {
let location = panModalGestureRecognizer.location(in: view)
// You can do something with the location value,
// like determine if it is in a place where you want the gesture recognizer to prioritize, but returning
// false just solved my cases.
return false
}
This method is a method to be implemented by PanModalPresentable
protocol.
@hamdshah @demon9733 @qwertycommander
What worked for me is just returning nil to "panScrollable"
var panScrollable: UIScrollView? { return nil }
@qwertycommander Unfortunately that didn't work for me. Scroll still doesn't work entirely π. Setting different values for shortFormHeight
and longFormHeight
also didn't help.
@abdulazizSi Setting the panScrollable
to nil
indeed fixes the issue (I mentioned this in my first comment in this thread), but I really want to dismiss the card interactively.
What I ended up with is:
Setting the panScrollable
only for large devices:
var panScrollable: UIScrollView? {
if Device.isSizeOrLarger(.Inches_5_8) {
return textScrollView
} else {
return nil
}
}
Making the longFormHeight
a bit smaller to make it easier for the user to dismiss on small devices:
var longFormHeight: PanModalHeight {
if Device.isSizeOrLarger(.Inches_5_8) {
return .maxHeight
} else {
return .maxHeightWithTopInset(30)
}
}
I really hope to get this fixed soon since this behavior is really unsatisfying.
@hamdshah @demon9733 @qwertycommander
Doing this fix the problem , tested on simulator with UITableView and UIScrollView
π€―π€―
var allowsExtendedPanScrolling: Bool { return true }
var allowsExtendedPanScrolling: Bool { return true }
@abdulazizSi how did you implement this to a tableView? can u provide more details?
Description
Describe your issue here.
Tableview scroll works on devices with bigger screens e.g iPhone 11 pro Max and but doesn't work on smaller devices e.g iPhone 8/6S etc
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
PanModal version:
iOS version: 13.3
Steps to reproduce:
Expected result:
Actual result:
What actually happened
Attachments:
Logs, screenshots, screencast, sample project, funny gif, etc.