Skip to content

Commit

Permalink
Create gh-pages branch via GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexis Creuzot committed Jul 11, 2013
1 parent 0456ec8 commit 9869c88
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
26 changes: 14 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,17 @@ <h2>
<a name="install" class="anchor" href="#install"><span class="octicon octicon-link"></span></a>Install</h2>

<h3>
<a name="normal-install" class="anchor" href="#normal-install"><span class="octicon octicon-link"></span></a>Normal install</h3>
<a name="lame-install" class="anchor" href="#lame-install"><span class="octicon octicon-link"></span></a>Lame install</h3>

<ul>
<li>Just copy the <code>KAProgressLabel/KAProgressLabel</code> folder into your project.</li>
<li>Copy the <code>KAProgressLabel/KAProgressLabel</code> folder into your project.</li>
<li>Import KAProgressLabel.h from your .pch file</li>
</ul><h3>
<a name="using-cocoapods" class="anchor" href="#using-cocoapods"><span class="octicon octicon-link"></span></a>Using Cocoapods</h3>
<a name="using-cocoapods" class="anchor" href="#using-cocoapods"><span class="octicon octicon-link"></span></a>Using <a href="http://cocoapods.org">cocoapods</a>
</h3>

<p><code>pod 'KAProgressLabel', :git =&gt; 'https://github.com/kirualex/KAProgressLabel'</code></p>
<p>add this line to your Podfile : :
<code>pod 'KAProgressLabel'</code></p>

<h2>
<a name="usage" class="anchor" href="#usage"><span class="octicon octicon-link"></span></a>Usage</h2>
Expand All @@ -60,15 +62,15 @@ <h3>
<h4>
<a name="color" class="anchor" href="#color"><span class="octicon octicon-link"></span></a>Color</h4>

<div class="highlight"><pre><span class="p">[</span><span class="n">_myProgressLabel</span> <span class="n">setProgressColor</span><span class="o">:</span><span class="p">[</span><span class="n">UIColor</span> <span class="n">black</span><span class="p">])];</span> <span class="c1">// black progress bar</span>
<span class="p">[</span><span class="n">_myProgressLabel</span> <span class="n">setTrackColor</span><span class="o">:</span><span class="p">[</span><span class="n">UIColor</span> <span class="n">lightGrayColor</span><span class="p">])];</span> <span class="c1">// gray track bar</span>
<span class="p">[</span><span class="n">_myProgressLabel</span> <span class="n">setFillColor</span><span class="o">:</span><span class="p">[</span><span class="n">UIColor</span> <span class="n">clearColor</span><span class="p">])];</span> <span class="c1">// transparent fill color</span>
<div class="highlight"><pre><span class="p">[</span><span class="n">_myProgressLabel</span> <span class="n">setProgressColor</span><span class="o">:</span><span class="p">[</span><span class="n">UIColor</span> <span class="n">blackColor</span><span class="p">]];</span> <span class="c1">// black progress bar</span>
<span class="p">[</span><span class="n">_myProgressLabel</span> <span class="n">setTrackColor</span><span class="o">:</span><span class="p">[</span><span class="n">UIColor</span> <span class="n">lightGrayColor</span><span class="p">]];</span> <span class="c1">// gray track bar</span>
<span class="p">[</span><span class="n">_myProgressLabel</span> <span class="n">setFillColor</span><span class="o">:</span><span class="p">[</span><span class="n">UIColor</span> <span class="n">clearColor</span><span class="p">]];</span> <span class="c1">// transparent fill color</span>
</pre></div>

<h4>
<a name="borderwidth" class="anchor" href="#borderwidth"><span class="octicon octicon-link"></span></a>BorderWidth</h4>

<div class="highlight"><pre><span class="p">[</span><span class="n">_myProgressLabel</span> <span class="n">setBorderWidth</span><span class="o">:</span><span class="mi">5</span><span class="p">)];</span> <span class="c1">// 5px border</span>
<div class="highlight"><pre><span class="p">[</span><span class="n">_myProgressLabel</span> <span class="n">setBorderWidth</span><span class="o">:</span><span class="mi">5</span><span class="p">];</span> <span class="c1">// 5px border</span>
</pre></div>

<h3>
Expand All @@ -78,8 +80,8 @@ <h4>
<a name="set-progress" class="anchor" href="#set-progress"><span class="octicon octicon-link"></span></a>Set progress</h4>

<div class="highlight"><pre><span class="c1">// Progress must be between 0 and 1</span>
<span class="p">[</span><span class="n">_myProgressLabel</span> <span class="n">setText</span><span class="o">:</span><span class="s">@"50%"</span><span class="p">)];</span>
<span class="p">[</span><span class="n">_myProgressLabel</span> <span class="n">setProgress</span><span class="o">:</span><span class="p">(</span><span class="mi">50</span><span class="o">/</span><span class="mi">100</span><span class="p">))];</span>
<span class="p">[</span><span class="n">_myProgressLabel</span> <span class="n">setText</span><span class="o">:</span><span class="s">@"50%"</span><span class="p">];</span>
<span class="p">[</span><span class="n">_myProgressLabel</span> <span class="n">setProgress</span><span class="o">:</span><span class="p">(</span><span class="mi">50</span><span class="o">/</span><span class="mi">100</span><span class="p">)];</span>
</pre></div>

<h4>
Expand All @@ -104,8 +106,8 @@ <h4>
<span class="p">}</span>
</pre></div>

<h3>
<a name="other-methods" class="anchor" href="#other-methods"><span class="octicon octicon-link"></span></a>Other methods</h3>
<h2>
<a name="advanced-usage" class="anchor" href="#advanced-usage"><span class="octicon octicon-link"></span></a>Advanced Usage</h2>

<p>You may want to fine-tune yourself what arc to display or which way to draw it.
Yo can use these methods to do so.</p>
Expand Down
2 changes: 1 addition & 1 deletion params.json
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."}

0 comments on commit 9869c88

Please sign in to comment.