How to remove user nicknames from SBUChannelViewController

My application has a chat between only two people, so I’d like to remove the nickname from the chat cells. Is there a way to do this?

I’m using UIKit 1.2.7 on iOS 14.

Thanks!

Hi @dmtoptal

Could you elaborate more on what you are trying to achieve?
(i.e. use case)

Is Katherine be the nickname you refer to?

Did you not want to use the nicknames at all in your application in the signup, login process?

Hi Eric. Thanks for your help.

I want to show the name in the red box, but not the ones in the blue boxes.

If it was a 1-to-N chat, I could see why you’d want to know who the message is from. But since we’re doing a 1-to-1 chat, it just clutters the UI.

Hey @dmtoptal,

You can get that effect by setting the messageCellTheme’s ogTitleColor color to match the view’s background color. For example:

SBUTheme.messageCellTheme.ogTitleColor = UIColor(hex:"#FFFFFF")

Just be sure to do this before the view appears, such as in the preceding view controller.

Got it, thanks Jason!

1 Like