-
Notifications
You must be signed in to change notification settings - Fork 139
Issues with spring animation and collection view #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @heltisace, don't worry, I don't hate you :)
I think I know where the issue is and I'll try to fix it in the next couple of days. Cheers, |
@MarioIannotta Thanks :) Though adding Regarding the second question, shortly speaking, if you expand a Thanks for trying to help :) Edit: I meant |
That's right, the guard solve the issue but I don't think is conceptually right (sorry I'm a little bit picky :)) Maybe I've found another way to solve the issue in the library itself. Do you mind trying it?
instead of
In the method If you're using xcode 10 and you've installed the library using cocoapod, a clean could be necessary. I'll tackle the other issue tomorrow, you're right it's late 😴 |
Okay. Will let you know tomorrow. Good night. Cheers :D |
Hi. This code indeed solves the issue.
Now back to the question I mentioned yesterday. I downloaded your test project and decided to show you what I want in it. First of all, I found an issue. Look at the bottom animation when the add button is pressed. Secondly, as you can see on this video if you try to expand PullUpController, starting the pan gesture on the table, in your case, it will continue scrolling farther. Imagine if you have only a table in your drawer. You will either have to return to the top or expand it very carefully. So what I want, is for drawer not to be scrolled in that case. My solution was to disable scroll at the middle position and then enable back at the top, though it's not only not the best decision but also sometimes cases such issues as some items stop to be clickable at the middle position. Do you have any ideas on how to solve this? Thanks, |
Hi. Wanted to add, that it could be useful to be able to see the current point of PullUpController not only in |
Hi, Cheers, |
@MarioIannotta hi. Thanks for your work! If you are still able to listen to my complaints, this indeed makes things better, though if you do fast small scrolls you will get this. The idea with bouncing offset is brilliant and I also wanted to propose something like this. UPD: In case you wonder what the heck this transparent button is doing in the bottom that is not your bug, I just decided to respond as fast as could, while was in process of implementing a new feature. |
@MarioIannotta also I'm not sure how much |
You're one hell of a tester! Thanks for finding out all of these bugs :) Thanks! |
Hi, thanks :) Surely I will look through changes tomorrow. Will try to explain my point in #35 in a moment. |
Hello. If you are still subscribed to this issue, then... Here's a vid. Shortly:
Your's hell of a tester :P UPD: I wasn't quite sure if you could see the second issue in the first video, so here's another one. |
Hi again, Update: It was a problem with the bouncing calculation, check out my last commit on develop and let me know! Super many thanks!! :) |
H-h-h-hi.. I'm pretty much sure that I've downloaded the last version with last commit.. I've even checked new code lines that you added. Though.. Here. |
I've accidentally have written this to the wrong issue. I deal with content scrolling like this for now. If you try just to change This in the subclass of my CustomPullController. //MARK: The function that is called each time user is about to scroll
func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
//Setting scrolling value according to opened state
collectionView.set(scrolling: state == .open)
} This is custom collection view. //MARK: Custom collectin view to work with PullUp
class PullUpCollectionView: UICollectionView {
//MARK: Variable saying if should be scrollable
private var scrolling: Bool = false
//MARK: Variable that saves initial content offset value
private var initialContentOffset: CGPoint = .zero
//MAKR: The function for setting if scrolling is enabled
func set(scrolling: Bool) {
//Setting scrolling
self.scrolling = scrolling
//And initial content offset
self.initialContentOffset = contentOffset
}
//MARK: Overriding content offset
override var contentOffset: CGPoint {
//On set
didSet {
//Checking if value is not the initial and shouldn't scrolling
if contentOffset != initialContentOffset && !scrolling {
//Then setting value back to starter one
contentOffset = initialContentOffset
}
}
}
} |
In new the version, content keeps scrolling, if there are enough of elements when you scroll down PullUpController (this and plus those two bugs I've already named above). That's how it works in the old version + my custom collection view and that's what I wanted. In new the version, collection view doesn't help anymore. At least without any changes :( |
Maybe I could revert that commit and you could create a PR adding your collection view subclass to fix the issue? |
@MarioIannotta maybe, though it seems to me like not quite a right type of solution, you trying to use in your lib. The only thing my collection view does is disabling scroll the way it doesn't cause any issues further. And then I just call it when PullUp starts moving and disable when it stops. UPD: Plus, the code is already above. I just call |
Uh oh!
There was an error while loading. Please reload this page.
Hello again. At this moment you are probably already sick of me, though I found a few more problems. Sorry :P
I checked that is caused by custom
Spring animation
. Good news is that it can be fixed if you check if the duration is 0 and if so don't animate. Though probably it could be better ifpullUpControllerAnimate
won't just be called if duration is 0? 🤔PullUpController
as well, checked usingDebug View Hierarchy
and all objects areUser Interactable
. Just can't get what's going on. Probably some collection view issue, but it would be very nice if you could help in any way 🤔Hoping that you don't hate me too much T.T,
Heltisace
The text was updated successfully, but these errors were encountered: