diff --git a/Kodi Remote.xcodeproj/project.pbxproj b/Kodi Remote.xcodeproj/project.pbxproj index 826b5f1a8..1efc8a12c 100644 --- a/Kodi Remote.xcodeproj/project.pbxproj +++ b/Kodi Remote.xcodeproj/project.pbxproj @@ -22,7 +22,6 @@ 0F40F5A7164D5FA000AF9DE9 /* RightMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F40F5A5164D5FA000AF9DE9 /* RightMenuViewController.m */; }; 0F4156451646D810009E6DD4 /* JBKenBurnsView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F4156441646D810009E6DD4 /* JBKenBurnsView.m */; }; 0F4205D217099AE500EA533C /* RecentlyAddedCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F4205D117099AE500EA533C /* RecentlyAddedCell.m */; }; - 0F44EC5118A6672100BE44BD /* ProgressPieView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F44EC5018A6672100BE44BD /* ProgressPieView.m */; }; 0F487B4C15396D4C004530C1 /* HostViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F487B4A15396D4C004530C1 /* HostViewController.m */; }; 0F4883C41521B3D400883243 /* GlobalData.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F4883C31521B3D400883243 /* GlobalData.m */; }; 0F4883D21521CC7300883243 /* VolumeSliderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F4883D11521CC7300883243 /* VolumeSliderView.m */; }; @@ -142,8 +141,6 @@ 0F4205D017099AE500EA533C /* RecentlyAddedCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecentlyAddedCell.h; sourceTree = ""; }; 0F4205D117099AE500EA533C /* RecentlyAddedCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RecentlyAddedCell.m; sourceTree = ""; }; 0F44E2D41527A9DF00D5958F /* playlistCellView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = playlistCellView.xib; sourceTree = ""; }; - 0F44EC4F18A6672100BE44BD /* ProgressPieView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProgressPieView.h; sourceTree = ""; }; - 0F44EC5018A6672100BE44BD /* ProgressPieView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProgressPieView.m; sourceTree = ""; }; 0F487B4915396D4C004530C1 /* HostViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HostViewController.h; sourceTree = ""; }; 0F487B4A15396D4C004530C1 /* HostViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HostViewController.m; sourceTree = ""; }; 0F487B5915399716004530C1 /* serverListCellView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = serverListCellView.xib; sourceTree = ""; }; @@ -362,8 +359,6 @@ 0F089AA418EC4E3300F32430 /* SettingsValuesViewController.m */, C7E176492D1ECD7D0060AE86 /* ProgressBarView.h */, C7E176472D1ECD6C0060AE86 /* ProgressBarView.m */, - 0F44EC4F18A6672100BE44BD /* ProgressPieView.h */, - 0F44EC5018A6672100BE44BD /* ProgressPieView.m */, 0FEE08141704819A00EC9BC7 /* FloatingHeaderFlowLayout.h */, 0FEE08151704819A00EC9BC7 /* FloatingHeaderFlowLayout.m */, 0F370052151F6A9E00A3D42C /* jsonDataCell.h */, @@ -848,7 +843,6 @@ 0FEAE76816EA632800387DED /* ActorCell.m in Sources */, 0F00207816EE247A003822B5 /* OBSlider.m in Sources */, 0F284A5216F63C9A00AFC1EF /* PosterLabel.m in Sources */, - 0F44EC5118A6672100BE44BD /* ProgressPieView.m in Sources */, 0F284A5516F6419700AFC1EF /* PosterCell.m in Sources */, 0F8E308816FA536C009DEE72 /* PosterHeaderView.m in Sources */, C78C30F528F877870055CD95 /* VersionCheck.m in Sources */, diff --git a/XBMC Remote/ProgressPieView.h b/XBMC Remote/ProgressPieView.h deleted file mode 100644 index 761979e81..000000000 --- a/XBMC Remote/ProgressPieView.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// ProgressPieView.h -// XBMC Remote -// -// Created by Giovanni Messina on 8/2/14. -// Copyright (c) 2014 joethefox inc. All rights reserved. -// - -#import - -@interface ProgressPieView : UIView { - int padding; - CGFloat lineWidth; - UIColor *pieColor; - CGFloat radius; - CAShapeLayer *progressShape; -} - -- (id)initWithFrame:(CGRect)frame color:(UIColor*)aColor; -- (void)updateProgressPercentage:(CGFloat)progresspercentage; -- (CGFloat)getPieRadius; -- (CGFloat)getPiePadding; -- (CGFloat)getLineWidth; - -@property (nonatomic, readonly) UILabel *pieLabel; - -@end diff --git a/XBMC Remote/ProgressPieView.m b/XBMC Remote/ProgressPieView.m deleted file mode 100644 index 5ac8dcb81..000000000 --- a/XBMC Remote/ProgressPieView.m +++ /dev/null @@ -1,96 +0,0 @@ -// -// ProgressPieView.m -// XBMC Remote -// -// Created by Giovanni Messina on 8/2/14. -// Copyright (c) 2014 joethefox inc. All rights reserved. -// - -#import "ProgressPieView.h" -#import "Utilities.h" -#import "AppDelegate.h" - -@implementation ProgressPieView - -@synthesize pieLabel; - -- (id)initWithFrame:(CGRect)frame color:(UIColor*)aColor { - self = [super init]; - if (self) { - self.frame = frame; - [self pieCustomization:aColor]; - } - return self; -} -- (id)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - [self pieCustomization:[Utilities getSystemBlue]]; - } - return self; -} - -- (void)pieCustomization:(UIColor*)color { - padding = 8; - lineWidth = 1.0 / UIScreen.mainScreen.scale; - int pieLabelFontSize = 7; - self.backgroundColor = UIColor.clearColor; - pieColor = color; - radius = (MIN(self.frame.size.width, self.frame.size.height) / 2) - padding; - pieLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, radius * 2 + 4, self.frame.size.width, 8)]; - pieLabel.backgroundColor = UIColor.clearColor; - pieLabel.font = [UIFont systemFontOfSize:pieLabelFontSize]; - pieLabel.adjustsFontSizeToFitWidth = YES; - pieLabel.minimumScaleFactor = FONT_SCALING_DEFAULT; - pieLabel.textAlignment = NSTextAlignmentCenter; - pieLabel.textColor = color; - pieLabel.highlightedTextColor = color; - [self addSubview:pieLabel]; -} - -- (void)drawRect:(CGRect)rect { - CGContextRef contextRef = UIGraphicsGetCurrentContext(); - CGContextSetLineWidth(contextRef, lineWidth); - CGContextSetStrokeColorWithColor(contextRef, pieColor.CGColor); - CGRect circlePoint = (CGRectMake(padding, lineWidth * 2, radius * 2, radius * 2)); - CGContextStrokeEllipseInRect(contextRef, circlePoint); -} - -- (void)updateProgressPercentage:(CGFloat)progresspercentage { - progresspercentage = progresspercentage < 0 ? 0 : progresspercentage > 100 ? 100 : progresspercentage; - [self setNeedsLayout]; - CGFloat angle = (progresspercentage * 2 * M_PI) / 100; - [progressShape removeFromSuperlayer]; - progressShape = [self createPieSliceForRadian:angle]; - [self.layer addSublayer:progressShape]; -} - -- (CAShapeLayer*)createPieSliceForRadian:(CGFloat)angle { - CAShapeLayer *slice = [CAShapeLayer layer]; - slice.fillColor = pieColor.CGColor; - slice.strokeColor = pieColor.CGColor; - slice.lineWidth = 0; - CGFloat startAngle = -M_PI_2; - CGPoint center = CGPointMake(radius + padding, radius + lineWidth * 2); - UIBezierPath *piePath = [UIBezierPath bezierPath]; - [piePath moveToPoint:center]; - [piePath addLineToPoint:CGPointMake(center.x + radius * cosf(startAngle), center.y + radius * sinf(startAngle))]; - [piePath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:(angle - M_PI_2) clockwise:YES]; - [piePath closePath]; - slice.path = piePath.CGPath; - return slice; -} - -- (CGFloat)getPieRadius { - return radius; -} - -- (CGFloat)getPiePadding { - return padding; -} - -- (CGFloat)getLineWidth { - return lineWidth; -} - -@end