-
Fixes issues with inconsisten API. The
pauseProgress()
andresetProgress()
now work as expeted/intended. When callingpauseProgress()
, the completion on thestartProgress
function wont be called until it's actually been completed. When callingresetProgress
the completion forstartProgress
is discarded and will no longer be called, since the ring has not actually completed (same with delegate).Thanks a lot to @MileyHollenberg for these fixes!
- Add new ring style
bordered
thanks to @abdulla-allaith!
- Adds three new properties for more fine grained control of the
progress knob.
valueKnobShadowBlur
,valueKnobShadowOffset
, andvalueKnobShadowColor
. Thanks to @xismic for the contribution!
- Add new properties
showsValueKnob
,valueKnobColor
, andvalueKnobSize
as requested by #97 - Add new
continueProgress
andpauseProgress
functions which allow fluid continuation and pausing of progress animations. - Add new delegate functions
didPauseProgress
, anddidContinueProgress
- Tons of refactoring and renaming of properties/functionality
Lots please refer to the documentation to get your code up to spec with version 3.0.0
- Add new
isClockwise
property which allows users of the library to set whether or not the ring should rotate in a clockwise fashion.
Thanks to @petewalker for adding this!
- Add example playground, remove old example workspace
- Enable app-extension safe API
- Build with Swift 4.1.2
Add right-to-left language support, thanks eladhayun.
- New property
rightToLeft
which when set to true will display the ring with RTL language support, for example whenrightToLeft = true
, the progress will beGB 100
instead of100 GB
.
Add feature requested in #86 and general clean up and refactoring of API.
- Add new
ring
paramater to functionsdidUpdateProgressValue
andwillDisplayLabel
so that they can be used with multiple rings if needed.
finishedUpdatingProgress(forRing:)
now changed tofinishedUpdatingProgress(for:)
didUpdateProgressValue(to:)
now changed todidUpdateProgressValue(for:to:)
willDisplayLabel(label:)
now changed towillDisplayLabel(for:_:)
setProgress(value:animationDuration:completion:)
now changed tosetProgress(to:duration:completion:)
- Build project with Swift 4.1
- Mark delegate methods as
@objc optional
to allow default or optional conformance, thanks to @AbelToy
- Fix issue with
@objc
and newwillDisplayLabel
method inUICircularProgressRingDelegate
.
- Add ability to modify ring label before drawing, thanks to @hohteri
- Fix bug with not checking
shouldAnimateProperties
in the progress ring layer.
Add new animateProperties(duration:animations:completion:)
method.
This allows you to animate any of the animatable properties of the UICircularProgressRing
, which currently are: innerRingColor
, innerRingWidth
, outerRingColor
, outerRingWidth
, innerRingSpacing
, fontColor
.
Example usage:
self.ring.animateProperties(duration: 1.5) {
// Animate things here
self.ring.innerRingColor = .purple
self.ring.outerRingColor = .blue
}
Add Objective-C support, thanks to @hohteri
Add Carthage Interface Builder support, thanks to @AbelToy.
- Add fix for progress ring requiring square frame
- Fix issue where height was set to width.
- Use min between height and width to calculate radius for both outer and inner ring
- Code optimization & Added missing test cases
- Refactored test cases to also test UICircularProgressRingLayer.
- Add missing test cases for new gradient members.
- Add explicit typing to local variables in order to speed up compilation.
- Add new Swift compiler flags to warn about long function/type inference compilation.
- Improved calculations for inner ring angle.
- Thanks to @jeffro256 for committing.
- Add
s.ios.deployment_target = "8.0"
to Podspec, thanks to @younatics
- Fix issue where outer ring width couldn't be smaller than inner ring width. Thanks to: SwiftTsubame for the contribution.
- Add ability to set a range of values for the ring, unlike before where only
maxValue
could be set. You can now use the newminValue
to specify a range that the value can fall between. Read the docs to learn about any issues that may arise with setting avalue
less thanminValue
. - Fixed bugs related to how many degrees the inner ring for the progress ring draws. Everything should exact now even if not using the
fullCircle
property. - Fixed a bug which allowed setting a
value
less than zero. Read the docs to learn why this was an issue. - Refactored some unused code and tidied things up a bit
- Regenerated documentation using Jazzy
- New method in
UICircularProgressRingDelegate
,didUpdateProgressValue(to newValue: CGFloat)
, which can be used to get notified of value changes to the progress ring in real time. As the documentation states, this is a very hot method and it may be called hundreds of times per second, thus only very minimal work should be performed in this method.
- Make sure
.swift-version
is included in pod, in order to fix issue with Xcode 9
- Updated project settings to recommended Xcode settings
- Updated language to Swift 4
- Updated
@objc inference
todefault
- Added new progress ring style
gradient
which allows for drawing a gradient inner ring given some colors. - Added 4 new properties to
UICircularProgressRingView
which are used to determine the look of the gradient when drawing - Added new enumeration type
UICircularProgressRingGradientPosition
to determine position of gradient for drawing purposes - Updated docs to reflect these new changes
None!
- Refactored the
ringStyle
property toibRingStyle
and made unavailable for use with code (see below) - Refactored
outerRingCapStyle
, andinnerRingCapStyle
into new properties and made them unavailable for code use. As these properties will only be used for interface builder, while I patiently wait for Apple to allow enums in IBInspectable properties - Added new
ringStyle
which uses new typeUICircularProgressRingStyle
enum to make it easier and safer to assign a style to the progress ring - Added new
outCapStyle
andinCapStyle
enum properties of typeCGCapStyle
which again, allow for easer and safer assignment of progress ring cap styles in code. - Refactored most of the source code to maintain a max line width of 80, cause I'm insane like that
- Updated documentation
Due to the refactoring, any code which previously used these properties will have to use the new enumerations provided (sorry).
Also, since the ringStyle
property was changed to ibRingStyle
then any customized ring style inside of Interface Builder will need to be updated to use the new property, you may see a warning from interface builder. To fix these warnings: Go into the class inspector of the view, under User Defined Run Time Attributes
remove any of the ringStyle
values. Then refresh the views by doing Editor -> Refresh Views
- Fix deprecation warning in new Xcode version from using
M_PI
- Add new
fullCircle
property to theUICircularProgressRingView
. Which removes the confusion of setting a valid end angle. For example previously if you wanted a full circle and you wanted the progress to start from the top you could dostartAngle = -90
however this would also require you to subtract 90 from the end angle, since the default is 360. This was not fully understood by some users. Now you have the option usingfullCircle
to set and forget thestartAngle
and theendAngle
will automagically be corrected for you, thus always giving you a full circle with your desired start angle. - Update some Xcode unit tests
- Update documentation to include new
fullCircle
property
With the addition of the fullCircle
property which is true
by default anyone who was using a non-circular progress ring will see that their progress ring is now circular. To fix this either set fullCircle
to false
via code or go into interface builder and toggle Full Circle
to Off
.
- Fix bug where the default
valueIndicator
'%' - was not set on initialization
Nothing really, but previously if you had not set the valueIndicator
property then there would be no value indicator shown to the right of the value. This was not intended and has been fixed in this release. If you prefer to have no value indicator, you must now explicitly set the property to empty
ring.valueIndicator = ""
- Remove the
fontSize
andcustomFontWithName
properties - Add new
font
property of typeUIFont
to handle all font related configuration - Update documentation to include changes
- Since no longer using
fontSize
orcustomFontWithName
any projects using these properties will break until updated to newerfont
and to useUIFont
. - Any interface builder views which used
fontSize
orcustomFontWithName
will now complain about breaking. To fix this simply go into the class inspector of the view, underUser Defined Run Time Attributes
remove any of thefontSize
orcustomFontWithName
values. Then refresh the views by doingEditor -> Refresh Views
Why was this done?
This made sense to do because it was slightly confusing how to accomplish fonts and interface builder since apple does not add support for IBDesignable
fonts. I've decided to sacrifice the interface builder support for code only font management, because this leads to safer use of fonts since the view is no longer handleing the creation of UIFont
itself. This also adds more customization to the view since previously you could only change the font size and font. Now users can do whatever is allowed with UIFont, such as using defined font families, etc.
- Add a property for accessing the current value of the progress ring while animating, closes issue #14
- Add fix for removing a currently running animation when calling
setProgress(:)
while ring is animating, closes issue #19 - Fixed access levels for variables and functions, changed from
public
toopen
to allow subclassing. - Updated
docs
by running Jazzy
- Remove useless print statements from guards
- Fix line dash property when using
viewStyle = 3
not being set properly, thanks to RomainBSQT.
- Default completion handler to nil for
setProgress(:)
- Fix issue with module version number, now actually supports iOS 8
- Added some basic tests for right now
- Refactor some comments
- Remove
private
access, set tointernal
for unit testing - Fix default with inCapStyle being sett to wrong value
- Revert back to using
draw(rect:)
as was having issues with nib loaded views? - Change class of UICircularProgressRingLayer from
CALayer
toCAShapeLayer
-
Remove overridden
draw(rect:)
method to avoid any issues with performance and iOS drawing- Implemented
prepareForInterfaceBuilder
to still allow for IB designing
- Implemented
-
Remove strong reference to delegate
- UICircularProgressRingDelegate is now a class protocol
- UICircularProgressRingDelegate inside of UICircularProgressRingView is now weak to avoid retain cycle
- UICircularProgressRingDelegate is now a
protocol: class
can only be used onclass
types
Fix bug where progress bar was pixelated inside of tableView from issue #4
Thanks to @DeepAnchor for the fix!
- Default background color for view and layer is now of
UIColor.clear
Lower required iOS version to iOS 8.0
- Lower podspec for compatibility with iOS 8.0
- Lower project deployment target to 8.0
Fix inaccessible ring value thanks to @DaveKim
- Update delegate method parameters for more Swift like method names/parameters
- Update Xcode project to recommended settings
Delegate method renamed to: func finishedUpdatingProgress(forRing ring: UICircularProgressRingView)
(this is the last time, I swear)
Add isAnimating to UICircularProgressRingView
- Added new property to determine whether ring is animating currently
- Fix some typos
- Made completion handler default to nil
- Refactor delegate method call to look more Swifty
Delegate method renamed to: func finishedUpdatingProgress(forRing: UICircularProgressRingView)
- Refactor code into two separate files (UICircularProgressRingView, and UICircularProgressRingLayer)
- Fix animation, now works smoothly both increasing and decreasing
- More stability in terms of not causing a crash due to RunLoop
- More documentation
- ITS READY