From 76b55cc2307f8410e0e2280b486cdf1ac40295d5 Mon Sep 17 00:00:00 2001 From: Bogdan Coticopol Date: Wed, 2 Jan 2019 00:16:26 +0200 Subject: [PATCH] Simple solution to solve focus issue on Apple TV. --- Limelight/UIComputerView.m | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Limelight/UIComputerView.m b/Limelight/UIComputerView.m index 0e4036d..dea2e51 100644 --- a/Limelight/UIComputerView.m +++ b/Limelight/UIComputerView.m @@ -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