How to change default white color of tvos swift TVCaptionButtonView selection?
I have tried to change in this way
class MyTVCaptionButtonView: TVCaptionButtonView {
override func didUpdateFocus(in context: UIFocusUpdateContext, with coordinator: UIFocusAnimationCoordinator) {
let highlight = context.nextFocusedView == self
print("highlighted \(highlight)")
self.backgroundColor = highlight ? .red : .green
self.contentView.backgroundColor = highlight ? .yellow : .black
}
}
But background when button is focused is still white