diff --git a/Limelight/Images.xcassets/UpdatingOverlayIcon.imageset/Contents.json b/Limelight/Images.xcassets/UpdatingOverlayIcon.imageset/Contents.json deleted file mode 100644 index 0a44cb2..0000000 --- a/Limelight/Images.xcassets/UpdatingOverlayIcon.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "updating.pdf", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Limelight/Images.xcassets/UpdatingOverlayIcon.imageset/updating.pdf b/Limelight/Images.xcassets/UpdatingOverlayIcon.imageset/updating.pdf deleted file mode 100644 index 549477a..0000000 --- a/Limelight/Images.xcassets/UpdatingOverlayIcon.imageset/updating.pdf +++ /dev/null @@ -1,68 +0,0 @@ -%PDF-1.5 -% -4 0 obj -<< /Length 5 0 R - /Filter /FlateDecode ->> -stream -xmQm1i `eR.G`|"K0^f{Jox}ϸ$T<.JFMpRyRiM)WJQ` N¨<"d]Qݭ dY(5:wLݱlVw)Xf'ed> - >> ->> -endobj -2 0 obj -<< /Type /Page % 1 - /Parent 1 0 R - /MediaBox [ 0 0 75 75 ] - /Contents 4 0 R - /Group << - /Type /Group - /S /Transparency - /I true - /CS /DeviceRGB - >> - /Resources 3 0 R ->> -endobj -1 0 obj -<< /Type /Pages - /Kids [ 2 0 R ] - /Count 1 ->> -endobj -6 0 obj -<< /Producer (cairo 1.16.0 (https://cairographics.org)) - /CreationDate (D:20190830182029-07'00) ->> -endobj -7 0 obj -<< /Type /Catalog - /Pages 1 0 R ->> -endobj -xref -0 8 -0000000000 65535 f -0000000638 00000 n -0000000422 00000 n -0000000350 00000 n -0000000015 00000 n -0000000328 00000 n -0000000703 00000 n -0000000819 00000 n -trailer -<< /Size 8 - /Root 7 0 R - /Info 6 0 R ->> -startxref -871 -%%EOF diff --git a/Limelight/UIComputerView.m b/Limelight/UIComputerView.m index 49666c2..81f59af 100644 --- a/Limelight/UIComputerView.m +++ b/Limelight/UIComputerView.m @@ -13,6 +13,7 @@ UIButton* _hostButton; UILabel* _hostLabel; UIImageView* _hostOverlay; + UIActivityIndicatorView* _hostSpinner; id _callback; CGSize _labelSize; } @@ -51,10 +52,14 @@ static const int LABEL_DY = 20; _hostLabel.textColor = [UIColor whiteColor]; _hostOverlay = [[UIImageView alloc] initWithFrame:CGRectMake(_hostButton.frame.size.width / 3, _hostButton.frame.size.height / 4, _hostButton.frame.size.width / 3, _hostButton.frame.size.height / 3)]; + _hostSpinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; + [_hostSpinner setFrame:_hostOverlay.frame]; + _hostSpinner.hidesWhenStopped = YES; [self addSubview:_hostButton]; [self addSubview:_hostLabel]; [self addSubview:_hostOverlay]; + [self addSubview:_hostSpinner]; return self; } @@ -132,6 +137,8 @@ static const int LABEL_DY = 20; [_hostLabel sizeToFit]; if (host.state == StateOnline) { + [_hostSpinner stopAnimating]; + if (host.pairState == PairStateUnpaired) { [_hostOverlay setImage:[UIImage imageNamed:@"LockedOverlayIcon"]]; } @@ -140,10 +147,11 @@ static const int LABEL_DY = 20; } } else if (host.state == StateOffline) { + [_hostSpinner stopAnimating]; [_hostOverlay setImage:[UIImage imageNamed:@"ErrorOverlayIcon"]]; } else { - [_hostOverlay setImage:[UIImage imageNamed:@"UpdatingOverlayIcon"]]; + [_hostSpinner startAnimating]; } float x = _hostButton.frame.origin.x + _hostButton.frame.size.width / 2;