fix: compose scene custom emoji button image not set adaptive appearance issue

This commit is contained in:
CMK 2021-06-08 17:31:27 +08:00
parent 0b77c19857
commit 96783ae1aa
1 changed files with 6 additions and 0 deletions

View File

@ -218,6 +218,12 @@ extension ComposeToolbarView {
}
private func updateToolbarButtonUserInterfaceStyle() {
// reset emoji
let emojiButtonImage = Asset.Human.faceSmilingAdaptive.image
.af.imageScaled(to: CGSize(width: 20, height: 20))
.withRenderingMode(.alwaysTemplate)
emojiButton.setImage(emojiButtonImage, for: .normal)
switch traitCollection.userInterfaceStyle {
case .light:
mediaButton.setImage(UIImage(systemName: "photo", withConfiguration: UIImage.SymbolConfiguration(pointSize: 20, weight: .regular))!, for: .normal)