From eadcf3b3eb24e1a40f29ea01bb15e2dafda98ea8 Mon Sep 17 00:00:00 2001 From: Diego Waxemberg Date: Sun, 26 Aug 2018 01:15:53 -0700 Subject: [PATCH] fixed 'unsafe' requests and can now click stuff --- Limelight/UIAppView.m | 3 +- Limelight/UIComputerView.m | 2 +- Moonlight TV/Base.lproj/Main.storyboard | 45 +++++++++++++++---------- Moonlight TV/Info.plist | 5 +++ 4 files changed, 35 insertions(+), 20 deletions(-) diff --git a/Limelight/UIAppView.m b/Limelight/UIAppView.m index 9a006ef9..889a52f5 100644 --- a/Limelight/UIAppView.m +++ b/Limelight/UIAppView.m @@ -35,7 +35,7 @@ static UIImage* noImage; [_appButton setBackgroundImage:noImage forState:UIControlStateNormal]; [_appButton setContentEdgeInsets:UIEdgeInsetsMake(0, 4, 0, 4)]; [_appButton sizeToFit]; - [_appButton addTarget:self action:@selector(appClicked) forControlEvents:UIControlEventTouchUpInside]; + [_appButton addTarget:self action:@selector(appClicked) forControlEvents:UIControlEventPrimaryActionTriggered]; [self addSubview:_appButton]; [self sizeToFit]; @@ -108,7 +108,6 @@ static UIImage* noImage; CGFloat padding = 4.f; [_appLabel setFrame: CGRectMake(padding, padding, _appButton.frame.size.width - 2 * padding, _appButton.frame.size.height - 2 * padding)]; [_appLabel setTextColor:[UIColor whiteColor]]; - [_appLabel setFont:[UIFont fontWithName:@"Roboto-Regular" size:10.f]]; [_appLabel setBaselineAdjustment:UIBaselineAdjustmentAlignCenters]; [_appLabel setTextAlignment:NSTextAlignmentCenter]; [_appLabel setLineBreakMode:NSLineBreakByWordWrapping]; diff --git a/Limelight/UIComputerView.m b/Limelight/UIComputerView.m index 3787b8c3..f7ebacdc 100644 --- a/Limelight/UIComputerView.m +++ b/Limelight/UIComputerView.m @@ -77,7 +77,7 @@ static const int LABEL_DY = 20; UILongPressGestureRecognizer* longPressRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(hostLongClicked)]; [_hostButton addGestureRecognizer:longPressRecognizer]; - [_hostButton addTarget:self action:@selector(hostClicked) forControlEvents:UIControlEventTouchUpInside]; + [_hostButton addTarget:self action:@selector(hostClicked) forControlEvents:UIControlEventPrimaryActionTriggered]; [self updateContentsForHost:host]; [self updateBounds]; diff --git a/Moonlight TV/Base.lproj/Main.storyboard b/Moonlight TV/Base.lproj/Main.storyboard index 85fbeca2..30a2a6e8 100644 --- a/Moonlight TV/Base.lproj/Main.storyboard +++ b/Moonlight TV/Base.lproj/Main.storyboard @@ -1,5 +1,5 @@ - + @@ -11,26 +11,37 @@ - + - - - - - - + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/Moonlight TV/Info.plist b/Moonlight TV/Info.plist index 8455c401..9bc2fb3c 100644 --- a/Moonlight TV/Info.plist +++ b/Moonlight TV/Info.plist @@ -39,5 +39,10 @@ UIUserInterfaceStyle Automatic + NSAppTransportSecurity + + NSAllowsArbitraryLoads + +