Commit 28717cf7 authored by Felix Paul Kühne's avatar Felix Paul Kühne

Add Circular Progress Indicator needed for future eyecandy

parent f851154b
......@@ -40,6 +40,7 @@
7DBC3B451711FC6C00DCF688 /* VLCAboutViewController~iphone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7DBC3B431711FC6C00DCF688 /* VLCAboutViewController~iphone.xib */; };
7DBC3B49171204ED00DCF688 /* About Contents.txt in Resources */ = {isa = PBXBuildFile; fileRef = 7DBC3B48171204EC00DCF688 /* About Contents.txt */; };
7DDD0429172D98E5005A7B10 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7DDD0428172D98E5005A7B10 /* CFNetwork.framework */; };
7DE480D1173FEA30003613E0 /* VLCCircularProgressIndicator.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DE480D0173FEA30003613E0 /* VLCCircularProgressIndicator.m */; };
A7924696170F0BA90036AAF2 /* libMediaLibraryKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A7924695170F0BA90036AAF2 /* libMediaLibraryKit.a */; };
A79246A7170F0ED20036AAF2 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A7924698170F0ED20036AAF2 /* Default-568h@2x.png */; };
A79246A8170F0ED20036AAF2 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = A7924699170F0ED20036AAF2 /* Default.png */; };
......@@ -124,6 +125,8 @@
7DBC3B431711FC6C00DCF688 /* VLCAboutViewController~iphone.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = "VLCAboutViewController~iphone.xib"; path = "../Resources/VLCAboutViewController~iphone.xib"; sourceTree = "<group>"; };
7DBC3B48171204EC00DCF688 /* About Contents.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "About Contents.txt"; sourceTree = "<group>"; };
7DDD0428172D98E5005A7B10 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; };
7DE480CF173FEA30003613E0 /* VLCCircularProgressIndicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCCircularProgressIndicator.h; sourceTree = "<group>"; };
7DE480D0173FEA30003613E0 /* VLCCircularProgressIndicator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCCircularProgressIndicator.m; sourceTree = "<group>"; };
A7924695170F0BA90036AAF2 /* libMediaLibraryKit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libMediaLibraryKit.a; path = "ImportedSources/MediaLibraryKit/build/Release-iphonesimulator/libMediaLibraryKit.a"; sourceTree = "<group>"; };
A7924698170F0ED20036AAF2 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
A7924699170F0ED20036AAF2 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
......@@ -275,6 +278,8 @@
7D6B07F61716D45B003280C4 /* VLCPlaylistGridViewCell.m */,
A7DA16CF171083DF00D6FED9 /* VLCExternalDisplayController.h */,
A7DA16D0171083DF00D6FED9 /* VLCExternalDisplayController.m */,
7DE480CF173FEA30003613E0 /* VLCCircularProgressIndicator.h */,
7DE480D0173FEA30003613E0 /* VLCCircularProgressIndicator.m */,
7DADC5601704FACC001DAC63 /* Imported */,
7DADC55C1704FAA8001DAC63 /* XIBs */,
A7924697170F0ED20036AAF2 /* Resources */,
......@@ -463,6 +468,7 @@
7D6B07C41716C9B8003280C4 /* NSIndexSet+AQIsSetContiguous.m in Sources */,
7D6B07C51716C9B8003280C4 /* UIColor+AQGridView.m in Sources */,
7D6B07F71716D45C003280C4 /* VLCPlaylistGridViewCell.m in Sources */,
7DE480D1173FEA30003613E0 /* VLCCircularProgressIndicator.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......
//
// VLCCircularProgressIndicator.h
// AspenProject
//
// Created by Felix Paul Kühne on 12.05.13.
// Copyright (c) 2013 VideoLAN. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface VLCCircularProgressIndicator : UIProgressView
@end
//
// VLCCircularProgressIndicator.m
// AspenProject
//
// Created by Felix Paul Kühne on 12.05.13.
// Copyright (c) 2013 VideoLAN. All rights reserved.
//
#import "VLCCircularProgressIndicator.h"
@implementation VLCCircularProgressIndicator
- (void)drawRect:(CGRect)rect
{
self.backgroundColor = [UIColor clearColor];
CGContextClearRect(UIGraphicsGetCurrentContext(), rect);
CGFloat startAngle, endAngle = 0.;
startAngle = M_PI * 1.5;
endAngle = startAngle + (M_PI * 2);
UIBezierPath* bezierPath = [UIBezierPath bezierPath];
// Create our arc, with the correct angles
[bezierPath addArcWithCenter:CGPointMake(rect.size.width / 2, rect.size.height / 2)
radius:(rect.size.width / 2) - 6
startAngle:startAngle
endAngle:(endAngle - startAngle) * self.progress + startAngle
clockwise:YES];
// Set the display for the path, and stroke it
bezierPath.lineWidth = 6.;
[[UIColor grayColor] setStroke];
[bezierPath stroke];
}
@end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment