我希望将输入附件栏的背景颜色更改为微红色。在 MessageKit 的示例代码中,没有任何可以更改背景颜色的内容。并且运行这段代码不起作用:
messageInputBar.backgroundColor = .red
or
messageInputBar.backgroundView.backgroundColor = .red
最佳答案
为了给 InputBarAccessoryView
上的不同部分着色,请使用以下代码片段:
- 为内容 View 着色:
messageInputBar.contentView.backgroundColor = .red
- 为文本输入 View 着色:
messageInputBar.inputTextView.backgroundColor = .red
- 为整个 View 着色:
messageInputBar.backgroundView.backgroundColor = .red
关于ios - 有没有办法可以更改消息套件中整个输入栏的背景颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70685792/