When I run my custom keyboard, it's always being styled with my dark style. If I use they keyboard in Safari for example, this code returns yellow when it should be red. If I then pull down Spotlight it still returns yellow. What am I doing wrong here?
override func textDidChange(textInput: UITextInput) {
self.nextKeyboardButton.backgroundColor = myColor
}
var myColor: UIColor {
get {
var proxy = textDocumentProxy as UITextDocumentProxy
if proxy.keyboardAppearance == UIKeyboardAppearance.Light {
return UIColor.redColor()
} else {
return UIColor.yellowColor()
}
}
}