Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
Version 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
luispadron committed Apr 12, 2018
1 parent 3c9b66a commit d3b836b
Show file tree
Hide file tree
Showing 25 changed files with 129 additions and 107 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Version 2.0.0

Add feature requested in [#86](https://github.com/luispadron/UICircularProgressRing/issues/86) and general clean up and refactoring of API.

- Add new `ring` paramater to functions `didUpdateProgressValue` and `willDisplayLabel` so that they can be used with multiple rings if needed.

## Breaking API Changes

- `finishedUpdatingProgress(forRing:)` now changed to `finishedUpdatingProgress(for:)`
- `didUpdateProgressValue(to:)` now changed to `didUpdateProgressValue(for:to:)`
- `willDisplayLabel(label:)` now changed to `willDisplayLabel(for:_:)`
- `setProgress(value:animationDuration:completion:)` now changed to `setProgress(to:duration:completion:)`

# Version 1.8.5

- Build project with Swift 4.1
Expand Down
2 changes: 1 addition & 1 deletion docs/Classes.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://luispadron.com" target="_blank" rel="external">Luis</a>. All rights reserved. (Last updated: 2018-04-09)</p>
<p>&copy; 2018 <a class="link" href="https://luispadron.com" target="_blank" rel="external">Luis</a>. All rights reserved. (Last updated: 2018-04-12)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
Expand Down
11 changes: 5 additions & 6 deletions docs/Classes/UICircularProgressRingView.html
Original file line number Diff line number Diff line change
Expand Up @@ -1377,9 +1377,9 @@ <h4>Declaration</h4>
<li class="item">
<div>
<code>
<a name="/c:@M@UICircularProgressRing@objc(cs)UICircularProgressRingView(im)setProgressWithValue:animationDuration:completion:"></a>
<a name="//apple_ref/swift/Method/setProgress(value:animationDuration:completion:)" class="dashAnchor"></a>
<a class="token" href="#/c:@M@UICircularProgressRing@objc(cs)UICircularProgressRingView(im)setProgressWithValue:animationDuration:completion:">setProgress(value:animationDuration:completion:)</a>
<a name="/c:@M@UICircularProgressRing@objc(cs)UICircularProgressRingView(im)setProgressTo:duration:completion:"></a>
<a name="//apple_ref/swift/Method/setProgress(to:duration:completion:)" class="dashAnchor"></a>
<a class="token" href="#/c:@M@UICircularProgressRing@objc(cs)UICircularProgressRingView(im)setProgressTo:duration:completion:">setProgress(to:duration:completion:)</a>
</code>
</div>
<div class="height-container">
Expand All @@ -1402,8 +1402,7 @@ <h2 id='author' class='heading'>Author</h2>
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">@objc</span> <span class="kd">open</span> <span class="kd">func</span> <span class="nf">setProgress</span><span class="p">(</span><span class="nv">value</span><span class="p">:</span> <span class="kt">CGFloat</span><span class="p">,</span> <span class="nv">animationDuration</span><span class="p">:</span> <span class="kt">TimeInterval</span><span class="p">,</span>
<span class="nv">completion</span><span class="p">:</span> <span class="kt"><a href="../Classes/UICircularProgressRingView.html#/s:22UICircularProgressRing0abC4ViewC0B10Completiona">ProgressCompletion</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
<pre class="highlight swift"><code><span class="kd">@objc</span> <span class="kd">open</span> <span class="kd">func</span> <span class="nf">setProgress</span><span class="p">(</span><span class="n">to</span> <span class="nv">value</span><span class="p">:</span> <span class="kt">CGFloat</span><span class="p">,</span> <span class="nv">duration</span><span class="p">:</span> <span class="kt">TimeInterval</span><span class="p">,</span> <span class="nv">completion</span><span class="p">:</span> <span class="kt"><a href="../Classes/UICircularProgressRingView.html#/s:22UICircularProgressRing0abC4ViewC0B10Completiona">ProgressCompletion</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>

</div>
</div>
Expand Down Expand Up @@ -1553,7 +1552,7 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://luispadron.com" target="_blank" rel="external">Luis</a>. All rights reserved. (Last updated: 2018-04-09)</p>
<p>&copy; 2018 <a class="link" href="https://luispadron.com" target="_blank" rel="external">Luis</a>. All rights reserved. (Last updated: 2018-04-12)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
Expand Down
2 changes: 1 addition & 1 deletion docs/Enums.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://luispadron.com" target="_blank" rel="external">Luis</a>. All rights reserved. (Last updated: 2018-04-09)</p>
<p>&copy; 2018 <a class="link" href="https://luispadron.com" target="_blank" rel="external">Luis</a>. All rights reserved. (Last updated: 2018-04-12)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
Expand Down
2 changes: 1 addition & 1 deletion docs/Enums/UICircularProgressRingGradientPosition.html
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://luispadron.com" target="_blank" rel="external">Luis</a>. All rights reserved. (Last updated: 2018-04-09)</p>
<p>&copy; 2018 <a class="link" href="https://luispadron.com" target="_blank" rel="external">Luis</a>. All rights reserved. (Last updated: 2018-04-12)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
Expand Down
2 changes: 1 addition & 1 deletion docs/Enums/UICircularProgressRingStyle.html
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://luispadron.com" target="_blank" rel="external">Luis</a>. All rights reserved. (Last updated: 2018-04-09)</p>
<p>&copy; 2018 <a class="link" href="https://luispadron.com" target="_blank" rel="external">Luis</a>. All rights reserved. (Last updated: 2018-04-12)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
Expand Down
2 changes: 1 addition & 1 deletion docs/Protocols.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://luispadron.com" target="_blank" rel="external">Luis</a>. All rights reserved. (Last updated: 2018-04-09)</p>
<p>&copy; 2018 <a class="link" href="https://luispadron.com" target="_blank" rel="external">Luis</a>. All rights reserved. (Last updated: 2018-04-12)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
Expand Down
69 changes: 36 additions & 33 deletions docs/Protocols/UICircularProgressRingDelegate.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ <h2 id='author' class='heading'>Author</h2>
<li class="item">
<div>
<code>
<a name="/c:@M@UICircularProgressRing@objc(pl)UICircularProgressRingDelegate(im)finishedUpdatingProgressForRing:"></a>
<a name="//apple_ref/swift/Method/finishedUpdatingProgress(forRing:)" class="dashAnchor"></a>
<a class="token" href="#/c:@M@UICircularProgressRing@objc(pl)UICircularProgressRingDelegate(im)finishedUpdatingProgressForRing:">finishedUpdatingProgress(forRing:)</a>
<a name="/c:@M@UICircularProgressRing@objc(pl)UICircularProgressRingDelegate(im)finishedUpdatingProgressFor:"></a>
<a name="//apple_ref/swift/Method/finishedUpdatingProgress(for:)" class="dashAnchor"></a>
<a class="token" href="#/c:@M@UICircularProgressRing@objc(pl)UICircularProgressRingDelegate(im)finishedUpdatingProgressFor:">finishedUpdatingProgress(for:)</a>
</code>
</div>
<div class="height-container">
Expand All @@ -98,43 +98,32 @@ <h2 id='author' class='heading'>Author</h2>
<div class="abstract">
<p>Delegate call back, called when progress ring is done animating for current value</p>

<ul>
<li>Paramater

<ul>
<li>ring: The ring which finished animating</li>
</ul></li>
</ul>

</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">@objc</span> <span class="kd">optional</span> <span class="kd">func</span> <span class="nf">finishedUpdatingProgress</span><span class="p">(</span><span class="n">forRing</span> <span class="nv">ring</span><span class="p">:</span> <span class="kt"><a href="../Classes/UICircularProgressRingView.html">UICircularProgressRingView</a></span><span class="p">)</span></code></pre>
<pre class="highlight swift"><code><span class="kd">@objc</span> <span class="kd">optional</span> <span class="kd">func</span> <span class="nf">finishedUpdatingProgress</span><span class="p">(</span><span class="k">for</span> <span class="nv">ring</span><span class="p">:</span> <span class="kt"><a href="../Classes/UICircularProgressRingView.html">UICircularProgressRingView</a></span><span class="p">)</span></code></pre>

</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>ring</em>
</code>
</td>
<td>
<div>
<p>The ring which finished animating</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/c:@M@UICircularProgressRing@objc(pl)UICircularProgressRingDelegate(im)didUpdateProgressValueTo:"></a>
<a name="//apple_ref/swift/Method/didUpdateProgressValue(to:)" class="dashAnchor"></a>
<a class="token" href="#/c:@M@UICircularProgressRing@objc(pl)UICircularProgressRingDelegate(im)didUpdateProgressValueTo:">didUpdateProgressValue(to:)</a>
<a name="/c:@M@UICircularProgressRing@objc(pl)UICircularProgressRingDelegate(im)didUpdateProgressValueFor:to:"></a>
<a name="//apple_ref/swift/Method/didUpdateProgressValue(for:to:)" class="dashAnchor"></a>
<a class="token" href="#/c:@M@UICircularProgressRing@objc(pl)UICircularProgressRingDelegate(im)didUpdateProgressValueFor:to:">didUpdateProgressValue(for:to:)</a>
</code>
</div>
<div class="height-container">
Expand All @@ -151,15 +140,20 @@ <h2 id='important' class='heading'>Important:</h2>
do very simple and non-intensive work in this method. Do any work that takes time will considerably slow down your application.</p>

<ul>
<li>Paramater newValue: The value which the ring has updated to</li>
<li>Paramater

<ul>
<li>ring: The ring which updated the progress</li>
<li>newValue: The value which the ring has updated to</li>
</ul></li>
</ul>

</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">@objc</span> <span class="kd">optional</span> <span class="kd">func</span> <span class="nf">didUpdateProgressValue</span><span class="p">(</span><span class="n">to</span> <span class="nv">newValue</span><span class="p">:</span> <span class="kt">CGFloat</span><span class="p">)</span></code></pre>
<pre class="highlight swift"><code><span class="kd">@objc</span> <span class="kd">optional</span> <span class="kd">func</span> <span class="nf">didUpdateProgressValue</span><span class="p">(</span><span class="k">for</span> <span class="nv">ring</span><span class="p">:</span> <span class="kt"><a href="../Classes/UICircularProgressRingView.html">UICircularProgressRingView</a></span><span class="p">,</span> <span class="n">to</span> <span class="nv">newValue</span><span class="p">:</span> <span class="kt">CGFloat</span><span class="p">)</span></code></pre>

</div>
</div>
Expand All @@ -169,9 +163,9 @@ <h4>Declaration</h4>
<li class="item">
<div>
<code>
<a name="/c:@M@UICircularProgressRing@objc(pl)UICircularProgressRingDelegate(im)willDisplayLabelWithLabel:"></a>
<a name="//apple_ref/swift/Method/willDisplayLabel(label:)" class="dashAnchor"></a>
<a class="token" href="#/c:@M@UICircularProgressRing@objc(pl)UICircularProgressRingDelegate(im)willDisplayLabelWithLabel:">willDisplayLabel(label:)</a>
<a name="/c:@M@UICircularProgressRing@objc(pl)UICircularProgressRingDelegate(im)willDisplayLabelFor::"></a>
<a name="//apple_ref/swift/Method/willDisplayLabel(for:_:)" class="dashAnchor"></a>
<a class="token" href="#/c:@M@UICircularProgressRing@objc(pl)UICircularProgressRingDelegate(im)willDisplayLabelFor::">willDisplayLabel(for:_:)</a>
</code>
</div>
<div class="height-container">
Expand All @@ -182,12 +176,21 @@ <h4>Declaration</h4>
<p>This method is called whenever the label is about to be drawn.
This can be used to modify the label looks e.g. NSAttributedString for text kerning</p>

<ul>
<li>Paramater

<ul>
<li>ring: The ring which the label will be displayed in</li>
<li>label: The label which will be displayed</li>
</ul></li>
</ul>

</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">@objc</span> <span class="kd">optional</span> <span class="kd">func</span> <span class="nf">willDisplayLabel</span><span class="p">(</span><span class="nv">label</span><span class="p">:</span> <span class="kt">UILabel</span><span class="p">)</span></code></pre>
<pre class="highlight swift"><code><span class="kd">@objc</span> <span class="kd">optional</span> <span class="kd">func</span> <span class="nf">willDisplayLabel</span><span class="p">(</span><span class="k">for</span> <span class="nv">ring</span><span class="p">:</span> <span class="kt"><a href="../Classes/UICircularProgressRingView.html">UICircularProgressRingView</a></span><span class="p">,</span> <span class="n">_</span> <span class="nv">label</span><span class="p">:</span> <span class="kt">UILabel</span><span class="p">)</span></code></pre>

</div>
</div>
Expand All @@ -199,7 +202,7 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://luispadron.com" target="_blank" rel="external">Luis</a>. All rights reserved. (Last updated: 2018-04-09)</p>
<p>&copy; 2018 <a class="link" href="https://luispadron.com" target="_blank" rel="external">Luis</a>. All rights reserved. (Last updated: 2018-04-12)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://luispadron.com" target="_blank" rel="external">Luis</a>. All rights reserved. (Last updated: 2018-04-09)</p>
<p>&copy; 2018 <a class="link" href="https://luispadron.com" target="_blank" rel="external">Luis</a>. All rights reserved. (Last updated: 2018-04-12)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
Expand Down
Loading

0 comments on commit d3b836b

Please sign in to comment.