Q: ios13 switching between light/dark mode not reflected on displayed keyboard with inputAccessoryView initially When switching between light and dark mode with iOS 13, I am experiencing an unusual behavior with the keyboard showing.
The view has an inputAccessoryView for a user to type in messages.  When then light/dark mode is switched with the keyboard showing, the light/dark mode does not reflect on the keyboard until the keyboard is hidden and shown again.  Initially this is what I'm seeing when switching between dark and light mode:

After dismissing the keyboard and showing again the color is normal.  This only happens on this keyboard with the inputAccessoryView.  When the mode is changed with just the inputAccessoryView without keyboard showing the inputAccessoryView colors change as expected. 

A: I came across this too. My solution was to resignFirstResponder on the UITextView in the inputAccessoryView when the color appearance changes. Not ideal, but gets round the problem.
(I had to override resignFirstResponder in the messageInputAccessoryView to resignFirstResponder on the textView)
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
    super.traitCollectionDidChange(previousTraitCollection)

    if #available(iOS 13.0, *) {
      if self.traitCollection.hasDifferentColorAppearance(comparedTo: previousTraitCollection) {
        _ = messageInputAccessoryView.resignFirstResponder()
      }
    }
  }

