'Is there a way I can change the background color of the whole input bar in Message Kit?
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
Solution 1:[1]
Have you tried this? :
messageInputBar.contentView.backgroundColor
Solution 2:[2]
In order to color the different parts on the InputBarAccessoryView, use these snippets:
- Coloring the content view:
messageInputBar.contentView.backgroundColor = .red
- Coloring the text input view:
messageInputBar.inputTextView.backgroundColor = .red
- Coloring the full view:
messageInputBar.backgroundView.backgroundColor = .red
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | ChrisMM |
| Solution 2 | nivbp |



