Giter VIP home page Giter VIP logo

kdcircularprogress's People

Contributors

alexander-foster avatar andrewcbancroft avatar brunolimam avatar izaakprats avatar jdanthinne avatar jeehut avatar justwudi avatar kaandedeoglu avatar kvnhm avatar maltalef avatar micahbenn avatar morbix avatar olucurious avatar readmecritic avatar stevekim0417 avatar tml-dan avatar yakoobs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kdcircularprogress's Issues

Problems when converting to new syntax

Hello, I am fairly new to coding so maybe I am missing something. I was using this extension for a little app I made, nothing special. It worked great in Xcode 7.3.1. However, I converted it to xCode 8 to syntax 3.0 I think. Now, I can not build or run my app. I get these errors https://postimg.org/image/foy1cjhd1/c54503f1/ (in the picture). Can you help me out? Thank you.

Swift 3 errors?

I think my problem is probably related to #49, but the solution there doesn't help me. I'm using CocoaPods 1.1.1 (Podfile included below). I delete the /Pods directory and run pod install. Everything seems OK until I open up the workspace and try to build. Then I get 70 errors, all in KDCircularProgress.swift. They look a lot like the errors I got when I was converting my own code over to Swift 3. They are:

/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:49:37: Missing argument label 'value:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:68:27: Missing argument label 'value:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:70:27: Missing argument label 'value:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:98:37: Missing argument label 'value:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:131:39: Missing argument label 'value:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:144:46: Missing argument label 'value:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:151:43: Missing argument label 'value:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:156:54: Contextual member 'blackColor' has no associated value
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:168:58: Contextual member 'clearColor' has no associated value
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:179:23: Missing argument label 'colors:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:193:9: 'userInteractionEnabled' has been renamed to 'isUserInteractionEnabled'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:201:19: Missing argument label 'colors:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:207:9: 'userInteractionEnabled' has been renamed to 'isUserInteractionEnabled'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:216:32: Method does not override any method from its superclass
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:227:28: Contextual member 'clearColor' has no associated value
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:228:35: Extra argument in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:248:23: Missing argument label 'colors:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:253:19: Missing argument label 'colors:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:261:80: 'NSTimeInterval' has been renamed to 'TimeInterval'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:266:32: 'NSTimeInterval' has been renamed to 'TimeInterval'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:270:44: Missing argument label 'value:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:271:35: 'NSTimeInterval' has been renamed to 'TimeInterval'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:279:30: Cannot assign value of type 'KDCircularProgress' to type 'CAAnimationDelegate?'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:283:23: 'addAnimation(_:forKey:)' has been renamed to 'add(_:forKey:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:286:59: 'NSTimeInterval' has been renamed to 'TimeInterval'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:294:73: Downcast from 'KDCircularProgress.KDCircularProgressViewLayer?' to 'KDCircularProgress.KDCircularProgressViewLayer' only unwraps optionals; did you mean to use '!'?
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:308:30: 'animationForKey' has been renamed to 'animation(forKey:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:311:26: Method does not override any method from its superclass
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:327:26: Argument names for method 'willMoveToSuperview(newSuperview:)' do not match those of overridden method 'willMoveToSuperview'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:327:26: 'willMoveToSuperview' has been renamed to 'willMove(toSuperview:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:367:66: Cannot call value of non-function type 'UIColor'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:373:36: 'CGGradientRef' has been renamed to 'CGGradient'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:392:29: Argument names for method 'needsDisplayForKey(key:)' do not match those of overridden method 'needsDisplayForKey'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:392:29: 'needsDisplayForKey' has been renamed to 'needsDisplay(forKey:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:393:50: 'needsDisplayForKey' has been renamed to 'needsDisplay(forKey:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:396:18: Initializer does not override a designated initializer from its superclass
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:423:23: Argument names for method 'drawInContext(ctx:)' do not match those of overridden method 'drawInContext'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:423:23: 'drawInContext' has been renamed to 'draw(in:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:433:13: 'CGContextAddArc' is unavailable: Use addArc(center:radius:startAngle:endAngle:clockwise:)
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:435:13: 'CGContextSetStrokeColorWithColor' has been replaced by instance method 'CGContext.setStrokeColor(_:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:435:62: 'CGColor' has been renamed to 'cgColor'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:436:13: 'CGContextSetFillColorWithColor' has been replaced by instance method 'CGContext.setFillColor(_:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:436:73: 'CGColor' has been renamed to 'cgColor'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:437:13: 'CGContextSetLineWidth' has been replaced by instance method 'CGContext.setLineWidth(_:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:438:13: 'CGContextSetLineCap' has been replaced by instance method 'CGContext.setLineCap(_:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:438:48: 'Butt' has been renamed to 'butt'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:439:13: 'CGContextDrawPath' has been replaced by instance method 'CGContext.drawPath(using:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:439:37: 'FillStroke' has been renamed to 'fillStroke'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:444:43: Missing argument label 'value:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:445:57: Missing argument label 'value:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:454:33: Value of optional type 'CGContext?' not unwrapped; did you mean to use '!' or '?'?
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:455:35: Value of optional type 'CGContext?' not unwrapped; did you mean to use '!' or '?'?
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:456:31: Value of optional type 'CGContext?' not unwrapped; did you mean to use '!' or '?'?
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:458:27: 'CGImageRef' has been renamed to 'CGImage'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:461:13: 'CGContextSaveGState' has been replaced by instance method 'CGContext.saveGState()'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:467:24: 'CGColorGetNumberOfComponents' has been replaced by property 'CGColor.numberOfComponents'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:467:59: 'CGColor' has been renamed to 'cgColor'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:468:42: 'CGColorGetComponents' has been replaced by property 'CGColor.components'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:468:69: 'CGColor' has been renamed to 'cgColor'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:476:62: 'CGColorGetComponents' has been replaced by property 'CGColor.components'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:476:89: 'CGColor' has been renamed to 'cgColor'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:480:40: Missing argument label 'ctx:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:484:47: Cannot call value of non-function type 'UIColor'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:503:40: Missing argument label 'ctx:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:506:13: 'CGContextRestoreGState' has been replaced by instance method 'CGContext.restoreGState()'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:511:13: 'CGContextSetFillColorWithColor' has been replaced by instance method 'CGContext.setFillColor(_:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:511:55: 'CGColor' has been renamed to 'cgColor'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:512:13: 'CGContextFillRect' has been replaced by instance method 'CGContext.fill(_:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:517:77: Missing argument label 'colorCount:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:534:62: Missing argument label 'value:' in call

Podfile

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

def infrastructure_pods
	pod 'Firebase/AdMob'
	pod 'Firebase/Crash'
	pod 'Firebase/RemoteConfig'

	pod 'RealmSwift', :git => 'https://github.com/realm/realm-cocoa.git', :submodules => true
	pod 'Realm', :git => 'https://github.com/realm/realm-cocoa.git', :submodules => true

	pod 'Alamofire', '~> 4.0'
end

def ui_pods
	pod 'KDCircularProgress'
end

target 'App' do
	infrastructure_pods
	ui_pods
end

target 'AppTests' do
	infrastructure_pods
	ui_pods
end

target 'AppTests' do
	infrastructure_pods
	ui_pods
end

Dividing By Zero

More for awareness here but if you're calculating the angle that the circle progress bar needs to go to, and you end up dividing by zero (I know you can't divide by zero but an example would be you're dividing two values and they both haven't been set and their default is zero) the simulator will run the app fine but running the phone on a device will cause it to freeze with no error or crashing.

Xcode 8.3.2 (8E2002)
iPhone 6, 10.2, (14C92)

Pod usage error

Howdy,

Love the class but getting an error after I install using cocoa pods 1.1.1. Here are my steps:

Add the pod to the pod file
pod install
add view to interface builder, with proper class and module
create outlet in associated source file

The last step is where it goes right off the rails, it does not find the class. Importing does not solve the either.

Including a pic of the error and a pic of the pod installed. Looking for a hint on why this is not working.

And, thanks in advance, great looking progress control!!!

screen shot 2016-11-29 at 5 10 14 pm
screen shot 2016-11-29 at 5 12 40 pm

Empty Space surrounding the progress indicator within the UIView

Hi, I have noticed that when the KDCircularProgress UIView is implemented there is a lot of empty space within the UIView surrounding the indicator, which takes up a fair amount of screen real-estate(see attached photo). Is there a way to reduce the amount of empty space?
kdprogress_example

Suppert subclassing

What are your stance on supporting subclassing? As far as I know there currently is now way to for example change the radius with code. It would be awesome if the library supported subclassing or overriding currently private properties with code. I have not tried it but it might be as easy as changing private to internal?

Could not generate continuous animation.

Hi, My intent is to generate animation from 0-360 degree continuously.
I tried to generate it using the following functions.

@IBAction func progressButtonTapped(sender: UIButton) {
continuousAnimation()
}

func continuousAnimation() {
circularProgressView.animateFromAngle(0, toAngle: 360, duration: 5) { (completed) in
if completed {
self.continuousAnimation()
print("completed = (completed)")
} else {
print ("completed = (completed)")
}
}
}

But the issue is that, only the first time the completion block gets executed and the animation runs twice. But after that the completion block never gets executed and there are no print statements. I am not sure if there is an error with my code, any suggestions are welcomed.

Modify progress / track thickness Int only

Hi,

I love the progress bar, playing around with it. I however seem to be unable to modify the thickness of the track and progress when working with the inspector in the Storyboard on a Double level, seems to be Int only. So the modifications are very coarse, not usable for production. The Inspector form field seems to not accept Doubles here. Any clue? Developing on Xcode 6.4 for iOS 8.4.

Kind regards,

Sander
screenshot

PS. I used this tutorial: https://www.andrewcbancroft.com/2015/07/09/circular-progress-indicator-in-swift/

How to remove the margin

screen shot 2016-04-11 at 6 16 33 pm

May I ask how to remove the margin between the circle and the border (blue line of the square)?
Thanks

Heavy flickering on iPad Air

Hi,

I am experiencing heavy flickering while testing the progress bar on an iPad Air.
UIView size is 600x600, using iOS 10.2.
I have also tested on an iPhone 5s, where the progress bar works fine, no issues on simulators either.
Unfortunately I am not allowed to upload a video, so I am attaching screenshots.
The progress bar seems to disappear and reappear rapidly, while the track stays put.

screen shot 2017-01-16 at 11 48 28
screen shot 2017-01-16 at 11 48 15
screen shot 2017-01-16 at 11 49 13

Parameters in code doesn't work

Hello! I use your library and I added a new parameter. But when I set this parameter from UIViewController, it doesn't work. This is a Bool parameter. How can I fix it?

animateDidStop calls animationcompletionblock before end of animation

Hi,

animationDidStop calls animationcompletionblock when started (iOS 10)

To fix it had to add a where (now in swif3 syntax is changed) clause to the if to check if the "finished flag" is true :

if let completionBlock = animationCompletionBlock, flag == true {
//animationCompletionBlock = nil
//completionBlock(flag)
}

btw: really nice lib

Interface Builder is not updating, together with IB Designables warnings

Hello

On Xcode 8, I created a blank view and set the class to "KDCircularProgress". The parameter page was updated with parameters specific to KDCircularProgress, which is a great start. However, nothing shows up on Interface Builder (still a blank, white view).

When I build the project, there was loads of warnings such as below.
Main.storyboard: warning: IB Designables: Ignoring user defined runtime attribute for key path "IBColor1" on instance of "UIView". Hit an exception when attempting to set its value: [<UIView 0x7fede05ed940> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key IBColor1.

Would you please suggest what might have gone wrong?

I use KDCircularProgress (1.5.0) from CocoaPod.

Many thanks.

Not able to set solid color without passing in two colors

if i attempt to set the progress bars color using the following:

self.downloadView.downloadProgressBar.set(colors: UIColor(red: 128.0, green: 211.0, blue: 64.0, alpha: 1.0))

The color gets set to white (as you've documented), but if i pass in two colors with very little difference i can get close to a solid color:

self.downloadView.downloadProgressBar.set(colors: UIColor(red: 129.0, green: 211.0, blue: 64.0, alpha: 1.0), .green)

is there another/better way to just set the color to 1 color without a gradient?

Many Errors after conversion to Swift3

Hello,

it is stated that master branch is now compatible with Swift 3.
I am using Xcode Version 8.0 (8A218a) and testing KDCircularProgress with a test project.
After CocoaPods pod install to version KDCircularProgress (1.5.2),
and opening the workspace file, Xcode wants to convert to Swift 3. This conversion fails with 66 errors in module KDCircularProgress.swift.

If it is compatible with Swift 3, what am I doing wrong here?
Thanks,
Tom

Carthage building the scheme fails

Hi, I have been using the circular progress for sometime now, today trying to update carthage and this is happening. Carthage is fetching some old versions every time, and every time is different version. Could you tell me if I could fix that somehow. Many thanks! The output in the terminal is below:

*** Checking out KDCircularProgress at "1.3.1"

*** Skipped building KDCircularProgress due to the error:
Dependency "KDCircularProgress" has no shared framework schemes for any of the platforms: iOS

If you believe this to be an error, please file an issue with the maintainers at https://github.com/kaandedeoglu/KDCircularProgress/issues/new

Completion status returning false on complete

I create a CircularProgress at on button press. I than send off a GET request and if I am animating when I finish with my request I pause and set a new animateFromAngle to complete in 1 second. I appears that doing this is causing the completed to return false in the new animeFromAngle.

Feature request: inner fill color

Can you please consider adding a setter for the fill color inside the circle? It would be helpful in creating effects like the one in the attached image. Thanks!

screen568x568

completion block in nested call to animateToAngle not firing

I have nest calls to animateToAngle like so:

self.progressView.animateToAngle(360, duration: 5, completion: { finished in
    self.progressView.clockwise = true
    self.progressView.trackColor = UIColor.progressGrayColor()
    self.progressView.angle = 0
    self.progressView.setColors(UIColor.somasoleColor(), UIColor.somasoleColor(), UIColor.somasoleColor())
    self.progressView.animateToAngle(360, duration: Double(movement.time!), completion: { finished in
        print("here") // sanity check
        self.progressView.clockwise = false
        self.progressView.setColors(UIColor.progressGrayColor(), UIColor.progressGrayColor(), UIColor.progressGrayColor())
        self.progressView.trackColor = UIColor.clearColor()
    })
})

but the subsequent call's completion block is not firing.. why would this be (the print statement does not print, and the other things don't work either)?

Does the Swift 3 version work in iOS 8 and 9?

Or do we need to do something special for apps that support iOS 8.4 and 9? My app uses this library but now crashes in iOS 10. If I update the library is there anything special needed to make sure it continues running on peoples devices that are running iOS 8 and 9?

Compiler error after update to 1.3.0

After I upgrade KDCircularProgress to 1.3.0 var cocoa pod, the compiler error appear.
I clean and restart Xcode(Version 7.1.1), but not fix the problem.

XXXX/Pods/GradientCircularProgress/Source/IndicatorStyle.swift:10:15: Type 'IndicatorStyle' does not conform to protocol 'StyleProperty'

XXXX//Pods/GradientCircularProgress/Source/OrangeDarkStyle.swift:10:15: Type 'OrangeDarkStyle' does not conform to protocol 'StyleProperty'

remove isUserInteractionEnabled = false

In my context, for further customization, i wanted to add a uibutton to the circular progress bar as a subview, and it drove me crazy because the button wouldn't work, only to find out later that isUserInteractionEnabled = false is set on init

the question is, does isUserInteractionEnabled affect the circular progress bar? (not as far as i know, please correct me if i'm wrong)

if that's the case, it should be removed, since it doesn't add any value to the component it self, only adds confusion in cases such as mine.

will make a PR as soon as i get the time (in case no one did)

return progress bar to initial position

Hi, kaandedeoglu! Thank you for KDCircularProgress. Initially I have green progress bar. When I tap the button, green progress starts to disappear and black track appears. At finish I have only black track. If I tap the button again, green progress appears and starts to disappear again. I need to see green bar before I tap the button, right after the end of the animation. Is it possible to add something to "if completed { }" to return progress bar to initial position?

screen shot 2016-12-08 at 20 27 14
screen shot 2016-12-08 at 20 27 55

Crashing when no width and height constraints set

When no height and width constraint is set on the IB, but instead top,right,bottom,left constraints in combination with a aspect ratio constraint, the following code causes the crash:

let g = CGGradientCreateWithColorComponents(baseSpace, componentsArray, locations,componentsArray.count / 4)
self.gradientCache = g
gradient = g!

as g is nil.

Do i have to set height and width in the interface builder?

How to continue the animation from the same place after pause?

Pressing continue after a pause the animation, the animation track starts from the beginning of the circle.
`progress.pauseAnimation() // PAUSE

// RESUME
progress.animate(fromAngle: 0, toAngle: 360, duration: duretionExersise) { completed in
if completed {
print("RESUME")
}
}`
how to fix to the track after a pause continued movement from the stopping point, not at starting position and continued to move at the same speed? Thank's

Make usable in Storyboard?

Hi!

Your circular progress bar has helped me immensely - thank you for creating it!

In a project I'm coding on, I tweaked the KDCircularProgress class to implement init(coder:) so that I could position the circular progress view with Auto Layout (rather than trying to mess with the positioning in code).

Would you be interested in collaborating on the implementation of this init method? I'm happy to create a pull request with what I've done so far... It works in the project I'm working on, so I think it might be a good start. I'd definitely want it to be done in a way that you'd approve of though. Let me know what you think!

Andrew

Color Transition issue

i want the circle to start of red and transition to yellow then finally to a complete green when it hits 360 degrees . With your libary the color would just transition back , how do i stop this? i want it to be like in the image bellow
goalbar

Window is nil when push or present to another view controller

Hi Kaandedeoglu, I used this lib to show circular progress view on a view controller and after finishing animation, I want to push or present to another view controller, app is crashed because new window is nil.
This bug is here:
public override func didMoveToWindow() {
progressLayer.contentsScale = window!.screen.scale
}
It should be:
public override func didMoveToWindow() {
if let window = window {
progressLayer.contentsScale = window.screen.scale
}
}
Best regards !

animateFromAngle crashes

Hi,
First I would like to say thank you for creating this beautiful progress. I have a UICollectionView and inside my collectionviewCell I have predefined a KDCirularProgressView. However When I want to run the animation, the app crashes with the following message:

The commented code is working fine, it is the animation that crashes the app.
Error message: fatal error: unexpectedly found nil while unwrapping an Optional value

Is this something that I did not code correctly or is there something I have missed? Thanks

2016-01-25 1 13 55 pm

2016-01-25 1 10 56 pm

Setting start angle or angle cause bad access

Since the update, setting start angle or angle would crash and the error is bad access.

screen shot 2016-04-09 at 21 01 46

I can't figure out why changing from int to double implementation would cause this error?

If I use step over, the error occurs right after this line.

podspecs for swift2.3

Could you submit a new tag with podspec for swift2.3
I need it for a pod dependency
Thanks

Using in Objective C project

I'm trying to use KDCircularProgress in my project written in Objective C:

    KDCircularProgress *progress = [[KDCircularProgress alloc]initWithFrame:self.view.bounds];
    progress.startAngle = 0;
    progress.progressThickness = 0.2;
    progress.trackThickness = 0.6;
    progress.clockwise = true;
    progress.gradientRotateSpeed = 2;
    progress.roundedCorners = YES;
    progress.glowAmount = 0.9;
    progress.progressColors = @[[UIColor blueColor], [UIColor greenColor]];
    [self.view addSubview:progress];
    [progress animateToAngle:180 duration:10 relativeDuration:NO completion:nil];

And have this strange result.:
kdcircularprogress

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.