SendBird UIKit | Position Chat Messages


How do I, in a groupchannel, get the message balloons on both sides (left ánd right). Using the Sendbird UIKit, all messages appear on the left side within the chat window by default.

Hi @Jeroen,

Welcome to the Sendbird Community! The messages should render on each side by default.

Have you overridden any of the views in your implementation?

Hi Tyler,

Thanks for your quick reply. Yes, I have added some custom subviews in the NavigationBar and the “enter text” area. I have subclassed SBUChannelViewController.

In that case, its likely that you’ll need to re-implement the way messages are rendered. You can take a look at our open source code for a better understanding of how thats achieved: sendbird-uikit-ios-sources/SBUChannelViewController.swift at main · sendbird/sendbird-uikit-ios-sources · GitHub

I just found the cause of the problem. It appears that SBUGlobals.CurrentUser was not set (nil) although SBDMain.getCurrentUser() did get the current user. Appearantly there is a need to set SBUGlobals.CurrentUser separately.

Glad to hear you were able to resolve that, and good to know that its set via the Globals.