We use a special centered cell for some meta information, such as group name changes and people joining and leaving a chat. In this cell we have a text that has a smaller font size and special styling (bold) on some parts of the text (NSAttributedText
).
The problem is that these cells text content will lose the font properties and are reset to the font set as the message bubble font for JSQMessageViewController
when making updates to the view, such as deleting a single cell/message, or when moving away from the view and back again.
It seems as if the cellForItemAtIndexPath
, where we define the cell content layout, is not called when this happens, but that JSQMessageViewController
has some internal cache that assigns the preset font and styles to the messages.
The places where this happens, one can of course force the visible cells to be updated and then the cellForItemAtIndexPath
is called, but there will actually be UI glitches, because the cells will be updated twice with a different styling.
Is there an alternative? Are we missing something?