skip to Main Content

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

2

Answers


  1. Have you tried this? :

    messageInputBar.contentView.backgroundColor
    
    Login or Signup to reply.
  2. 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
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search