eBay/NMessenger

Scroll to last Item Bug

magicmikek opened this issue · 5 comments

I extended my Messengerbarview with a Suggestion CollectionView on top.
Now, I got a bug that the Collectionview does not scroll to the last item correctly and cuts off the messages.

message scroll bug

This might be a duplicate of #172

@magicmikek , it would be nice to have a snippet of your code which configures NMessenger

NMessenger is configured like the example Project

This is the scroll to last Message function:

open func scrollToLastMessage(animated: Bool) { waitForMessageLock { DispatchQueue.main.async { if let indexPath = self.pickLastIndexPath() { self.scrollToIndex((indexPath as NSIndexPath).row, inSection: (indexPath as NSIndexPath).section, atPosition: .bottom, animated: animated) } //unlock the semaphore self.state.messageLock.signal() } } }

looks like you need to account for iPhone X safe area in the constraints for your custom input bar. Look at NMessengerViewController keyboardNotification(_:)