-
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alexis Creuzot
committed
Jul 11, 2013
1 parent
0456ec8
commit 9869c88
Showing
2 changed files
with
15 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"name":"Kaprogresslabel","tagline":"Minimal circular progress label","body":"# KAProgressLabel\r\n\r\nMinimal circular progress label for iOS\r\n\r\n![KAProgressLabel](http://i.imgur.com/NHlXx10.png)\r\n\r\n## Install\r\n\r\n### Normal install\r\n\r\n* Just copy the `KAProgressLabel/KAProgressLabel` folder into your project.\r\n* Import KAProgressLabel.h from your .pch file\r\n\r\n### Using Cocoapods\r\n\r\n`pod 'KAProgressLabel', :git => 'https://github.com/kirualex/KAProgressLabel'`\r\n\r\n## Usage\r\n\r\n### Display\r\n\r\nHave a look at the necessary code to display a progress label such as the one on top.\r\n\r\n#### Color\r\n\r\n```objective-c\r\n[_myProgressLabel setProgressColor:[UIColor black])]; // black progress bar\r\n[_myProgressLabel setTrackColor:[UIColor lightGrayColor])]; // gray track bar\r\n[_myProgressLabel setFillColor:[UIColor clearColor])]; // transparent fill color\r\n```\r\n\r\n#### BorderWidth\r\n\r\n```objective-c\r\n[_myProgressLabel setBorderWidth:5)]; // 5px border\r\n```\r\n\r\n### Progress\r\n\r\n####Set progress\r\n\r\n```objective-c\r\n// Progress must be between 0 and 1\r\n[_myProgressLabel setText:@\"50%\")];\r\n[_myProgressLabel setProgress:(50/100))];\r\n```\r\n\r\n####Set progress animated\r\nA delegate method is provided in order for you to change the content of the label according to your needs\r\n\r\n```objective-c\r\n- (void)viewDidLoad\r\n{\r\n\t[_myProgressLabel setDelegate:self];\r\n\t[_myProgressLabel setProgress:(50/100)\r\n\t withAnimation:TPPropertyAnimationTimingEaseOut\r\n\t duration:1\r\n\t afterDelay:0];\r\n}\r\n\r\n#pragma mark - delegate\r\n\r\n- (void)progressLabel:(KAProgressLabel *)label progressChanged:(CGFloat)progress\r\n{\r\n [label setText:[NSString stringWithFormat:@\"%.0f%%\", (progress*100)]];\r\n}\r\n```\r\n\r\n### Other methods\r\n\r\nYou may want to fine-tune yourself what arc to display or which way to draw it.\r\nYo can use these methods to do so.\r\n\r\n```objective-c\r\n- (void) setStartDegree:(CGFloat)startDegree;\r\n- (void) setEndDegree:(CGFloat)endDegree;\r\n- (void) setClockWise:(BOOL)clockWise;\r\n```\r\n\r\n\r\n\r\n","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."} | ||
{"name":"Kaprogresslabel","tagline":"Minimal circular progress label","body":"#KAProgressLabel\r\n\r\nMinimal circular progress label for iOS\r\n\r\n![KAProgressLabel](http://i.imgur.com/NHlXx10.png)\r\n\r\n##Install\r\n\r\n###Lame install\r\n\r\n* Copy the `KAProgressLabel/KAProgressLabel` folder into your project.\r\n* Import KAProgressLabel.h from your .pch file\r\n\r\n###Using [cocoapods](http://cocoapods.org)\r\n\r\nadd this line to your Podfile : :\r\n`pod 'KAProgressLabel'`\r\n\r\n\r\n##Usage\r\n\r\n###Display\r\n\r\nHave a look at the necessary code to display a progress label such as the one on top.\r\n\r\n####Color\r\n\r\n```objective-c\r\n[_myProgressLabel setProgressColor:[UIColor blackColor]]; // black progress bar\r\n[_myProgressLabel setTrackColor:[UIColor lightGrayColor]]; // gray track bar\r\n[_myProgressLabel setFillColor:[UIColor clearColor]]; // transparent fill color\r\n```\r\n\r\n####BorderWidth\r\n\r\n```objective-c\r\n[_myProgressLabel setBorderWidth:5]; // 5px border\r\n```\r\n\r\n###Progress\r\n\r\n####Set progress\r\n\r\n```objective-c\r\n// Progress must be between 0 and 1\r\n[_myProgressLabel setText:@\"50%\"];\r\n[_myProgressLabel setProgress:(50/100)];\r\n```\r\n\r\n####Set progress animated\r\nA delegate method is provided in order for you to change the content of the label according to your needs\r\n\r\n```objective-c\r\n- (void)viewDidLoad\r\n{\r\n\t[_myProgressLabel setDelegate:self];\r\n\t[_myProgressLabel setProgress:(50/100)\r\n\t withAnimation:TPPropertyAnimationTimingEaseOut\r\n\t duration:1\r\n\t afterDelay:0];\r\n}\r\n\r\n#pragma mark - delegate\r\n\r\n- (void)progressLabel:(KAProgressLabel *)label progressChanged:(CGFloat)progress\r\n{\r\n [label setText:[NSString stringWithFormat:@\"%.0f%%\", (progress*100)]];\r\n}\r\n```\r\n\r\n##Advanced Usage\r\n\r\nYou may want to fine-tune yourself what arc to display or which way to draw it.\r\nYo can use these methods to do so.\r\n\r\n```objective-c\r\n- (void) setStartDegree:(CGFloat)startDegree;\r\n- (void) setEndDegree:(CGFloat)endDegree;\r\n- (void) setClockWise:(BOOL)clockWise;\r\n```\r\n\r\n\r\n\r\n","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."} |