2

I wish to change the background color of the input accessory bar to a reddish color. In the example code for MessageKit, there isn't any to change the background color. And running this piece of code doesn't work:

messageInputBar.backgroundColor = .red
or
messageInputBar.backgroundView.backgroundColor = .red
Ralph Lee
  • 87
  • 2
  • 9

2 Answers2

3

In order to color the different parts on the InputBarAccessoryView, use these snippets:

  1. Coloring the content view:

enter image description here

messageInputBar.contentView.backgroundColor = .red
  1. Coloring the text input view:

enter image description here

messageInputBar.inputTextView.backgroundColor = .red
  1. Coloring the full view:

enter image description here

messageInputBar.backgroundView.backgroundColor = .red
nivbp
  • 310
  • 1
  • 11
1

Have you tried this? :

messageInputBar.contentView.backgroundColor
ChrisMM
  • 8,448
  • 13
  • 29
  • 48