-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Scroll to bottom fails until contentSize is at least a certain height #256
Comments
From the thread in #172:
|
More from thread in #172:
|
|
This helps, but it is still not great. It adds extra space until the scrollToIndexPath starts.
edit: actually, this doesn't generalize well at all. messages of different sizes really start to throw this off. |
Here is a hacky way that seems to work for me.
Have to force the collectionView to layout otherwise contentSize might not compute properly. |
@aaronsakowski - hacky indeed, but not too bad! better than my hack above. i'll do some testing to see how this behaves and merge if it looks good. 👍 i guess this is a UIKit bug. 😦 |
That's my guess. Thankfully the UIScrollView functions seem to work. |
thanks @aaronsakowski, indeed your "hack" works at my end too.. i was searching for a while to try and understand this scrolling issue, then finally read this ;) .. thank you. |
this hack starts to get wonky. sending large messages causes the collection view to scroll up way too much. also, if you begin with an empty collection view. after you send the 2nd message, the layout of the first bubble screws up and gets all weird. :( |
Yeah, I've seen a few randomly odd bubble sizes so far. Odd we can't simply ask the collectionview to just scroll down, period :) |
^ yes. agreed. :( |
Interesting. For me, the message bubble sizes are a bit off for long messages but it still scrolls properly. Can you give the steps to reproduce the strange scrolling? |
you should see that it scrolls up at about double the height of the long message. |
I can't seem to reproduce. Steps I took: Maybe somehow the collectionview layout is happening before the input toolbar goes back to it's previous size for a large message? |
I'm experiencing some similar issues with scrolling:
p.s. I'm using the latest 6.0 release of the control. |
Yes I have a project using 5.x currently, and by backporting this fix it works for the 3 days that I've been using it. It also works in the 6.x demo project (both simulator, and 5S). |
Thanks @dereck009 ! As this works for me too, I'm going to re-close this as resolved. @kross50 - If you can provide a project/code that will reproduce this issue, I'll be happy to re-open and reinvestigate! 👍 |
I'm still seeing this problem when I adjust the contentInset of the collection view.
|
Subtracting the inset top+bottom from collectionViewContentHeight seems to work, but that seems really strange to me. |
Thanks @ghazel - I'll check this out! |
hey @ghazel - i couldn't reproduce this on develop. then, i realized that it sounds like you are using custom inset values? is that the case? if so, let's open a separate issue to track this. |
I do have custom inset values, but I can reproduce it easily in the JSQ Demo on develop without them:
(run in iOS 8 iPhone 6 simulator) |
Hey guys, Current solution seems to not working for me - it still not scroll it to bottom when messages reach it.
Sorces version 7.3.3 (cloned from develop branch)
|
so solution I found is calculate actual content offset until UIKit is able to scroll it by itself. Some kind of mix of @jessesquires original fix and @dereck009 current solution. In a
See also that I extended ContentTooSmall zone by 10 points: EDIT: |
@alexeyhippie - want to submit a PR? |
@jessesquires the bug still exist in 7.3.4, just use the demo project and in the demo conversation just |
As a workaround I have added a value observer on the collection view's contentSize property and use it to invoke scrollToBottomAnimated after it has been updated. This seems to solve the problem. |
This issue also still exists for me. Any chance we can get it reopened? |
The text was updated successfully, but these errors were encountered: