Merge pull request #354 from eraser2021999/master

Simple solution to solve focus issue on Apple TV.
This commit is contained in:
Cameron Gutman
2019-01-04 20:27:43 -08:00
committed by GitHub

View File

@@ -204,4 +204,14 @@ static const int LABEL_DY = 20;
[_callback addHostClicked];
}
#if TARGET_OS_TV
- (void) didUpdateFocusInContext:(UIFocusUpdateContext *)context withAnimationCoordinator:(UIFocusAnimationCoordinator *)coordinator {
UIButton *previousButton = (UIButton *)context.previouslyFocusedItem;
UIButton *nextButton = (UIButton *) context.nextFocusedItem;
previousButton.layer.shadowColor = [[UIColor blackColor] CGColor];
nextButton.layer.shadowColor = [[UIColor greenColor] CGColor];
}
#endif
@end