Closed maail closed 9 years ago
I assume you have disabled inverted
mode, I am right?
self.inverted = false In the Swift example provided yes.
This is related to https://github.com/slackhq/SlackTextViewController/pull/144
On inverted = NO
, it's a bit more difficult to make the scrolling of the content at the same speed than the keyboard without having a few bugs. Give it a chance at that commit, and let me know.
From what I tested, it wasn't solving the issue consistently across all devices, and for some reason, there is a blink when starting scrolling from the bottom of the content view.
Tried at that commit. Works a bit better at the start.
But after a row is inserted below the keyboard the last inserted is row is never shown. Have to scroll down to see.
Tried with inverted = YES as well. Same issue. I'm using it with the Swift CollectionView Example. The objective-c examples work though. Might be issue with the custom Cell (SLKMessageViewCell) provided in the example? If so I can debug further.
Also related to https://github.com/slackhq/SlackTextViewController/issues/94
Porting the programatic Table View example to Swift fixed the issue for me.
The scrolling issue was due to using self.tableView.slk_scrollToBottomAnimated(true)
in didPressRightButton function.
Instead used these as in the Programatic Table View Example for didPressRightButton function
var scrollPosition: UITableViewScrollPosition = self.inverted ? UITableViewScrollPosition.Bottom : UITableViewScrollPosition.Top
self.tableView.scrollToRowAtIndexPath(idxPath, atScrollPosition: scrollPosition, animated: true)
self.tableView.reloadRowsAtIndexPaths([idxPath], withRowAnimation: UITableViewRowAnimation.Automatic)
hey @maail, I'm facing a similar issue with the inverted tableview. I've been diggining around but couldn't find a definite answer - has this problem been already solved? Trying your solution now but unfortunately getting a lot of jumping, inaccurate positioning and in some weird behavior with keyboard in general. Do you have any example of it working at hand?
In the Swift Example, when the text is entered it's not scrolling to the last entered row.
I've tried modifying the slk_scrollToBottomAnimated function in "UIScrollView+SLKAdditions.m" and couldn't get it to work. Might be issue with contentSize.height?