Hi,
Im trying to integrate your ChatLayout library into an iOS project. At first, let me thank you for awesome job you did here.
Currently Im trying to structure the chat the way that:
Every message in the chat is represented as a single section in the collection view and read indicator is always shown under the latest message as a footer of the last message (section).
1. Self-sizing/autolayout issue:
Im using self-sizing cells, but I'm not sure if Im setting the correct value for estimatedSize. The self-sizing in this library works for any non-zero values, so eg setting the estimatedSize like following
collectionLayout.settings.estimatedItemSize = CGSize(width: 1, height: 1)
will display the cells, but at the same time will result in broken autolayout constraints
"<NSLayoutConstraint:0x600001d0e990 'UIView-Encapsulated-Layout-Height' UIView:0x7fdcbc40d8e0.height == 1 (active)>"
I wanted to use some general purpose estimatedSize for self-sizing cells, similar to the flow layout one:
UICollectionViewFlowLayout.automaticSize
but later realised since this is a custom collection view layout, this value is not declared.
Setting the estimated size to a concrete value, e.g. CGSize(width: 100, height: 30)
will result in a treatment, where the cell's frame won't properly adjust as the content of the cell changes.
If you have any guidance here, Id really appreciate your help
2. Header/Footer are not part of the animation transaction
In my app, I want to treat the read indicator as a standalone item == not added as a subview in the cell, to gain better abstraction and to not pollute the cell with the standalone item.
Im including a sample SwiftUI app that leverages the ChatLayout - aim of this app is to showcase the issue #1 & #2.
ChatApp.zip
Any help highly appreciated!
Thanks!
![Screen-Recording-2020-10-31-at-20 05 05](https://user-images.githubusercontent.com/4924709/97788189-5b520880-1bb7-11eb-8614-ac48048c33c3.gif)