cardinalnow / ios-circleprogressview Goto Github PK
View Code? Open in Web Editor NEWCircleProgressView
License: MIT License
CircleProgressView
License: MIT License
how can animate automatically with UIView:animateWithDuration:animations: ?
the example below is not working :
[UIView animateWithDuration:5.0 animations:^{
self.progressView.progress = 1.0;
}];
In Readme file, it is compatible with iOS 7. But in podspec file, it require iOS 8. So, I can't use CocoaPod to install lib. I have to drop file manual. It is compatible iOS 7. Can you edit the podspec file for iOS 7?
Assertion failed: (start_angle >= end_angle), function void CG::Path::Subpath::add_arc(const CGPoint &, double, double, double, bool, const CGAffineTransform *), file Paths/path-subpath-arc.cc, line 53.
Hi,
your last commit resolved the
'M_PI' is deprecated: Please use 'Double.pi' or '.pi' to get the value of correct type and avoid casting.
issue. Please create a new Podspec version to make it accessible.
Thanks
Hello, if you want to use CircleProgressView in a Swift project, it has to be compiled as a Framework, that whats cocoapod does, but the source needs to be modified.
Class's access must be public, otherwise I cannot declare a object of class CircleProgressView
Some vars needs to be public too, like the "progress" var.
Please address this issue, because I don't want to fix it manually every time I do "pod install" to update my project ;-)
@IBDesignable public class CircleProgressView: UIView {
@IBInspectable public var progress: Double = 0.000001 {
didSet { setNeedsDisplay() }
}
Thanks for the great code, I want to add two labels inside this circle, how can I add them, any suggestions?
Hi there, thanks for the nice pod and can't say enough thanks to you guys.
I've converted my app to swift 4.2 and compiler is complaining on CircleProgressView. It seems that the latest swift 4.2 was made to master yet pushed to pods. can you do a version bump and pod repo push
?
Thanks
Code -> progressPath.addArcWithCenter(center, radius:radius, startAngle:startAngle, endAngle:endAngle, clockwise:!clockwise)
OutPut -> error in __connection_block_invoke_2: Connection interrupted
Assertion failed: (start_angle >= end_angle), function void CG::Path::Subpath::add_arc(const CGPoint &, double, double, double, bool, const CGAffineTransform *), file Paths/path-subpath-arc.cc, line 53.
Hi,
I was playing a little bit around with your nice view when I recognised a small issue.
I expected when I set the Center Fill Color
to clear and the Track Background Color
to something that the center will still be the clear. Instead it has the Track Background Color
How to reproduce:
Track Background Color
to blackCenter Fill Color
to clearexpected outcome: center is clear (usually white through white background)
actual outcome: center is black
Hi,
Is it possible to run it as a loading view, in circular mode?
Thanks
I discovered a memory leak. The reference to displayLink
keeps the instance from calling deinit
.
Changing from private var displayLink
to private weak var displayLink
solved the problem for me.
Is there a way to set the content mode of the progress view? I've tried setting it directly, but nothing's working.
When Center color is clear, it's filled by Track color.
how to set center Hollow
Hi,
I updated to CircleProgressView (1.1.2) and i still get compiler warnings here:
let startAngle:CGFloat = clockwise ? CGFloat(-internalProgress * M_PI / 180.0) : CGFloat(constants.twoSeventyDegrees * M_PI / 180)
let endAngle:CGFloat = clockwise ? CGFloat(constants.twoSeventyDegrees * M_PI / 180) : CGFloat(-internalProgress * M_PI / 180.0)
progressPath.addArc(withCenter: center, radius:radius, startAngle:startAngle, endAngle:endAngle, clockwise:!clockwise)
let r = radius - trackWidth * 0.5
if roundedCap {
let capCenter = CGPoint(x: center.x + r * cos(endAngle), y: center.y + r * sin(endAngle))
progressPath.addArc(withCenter: capCenter, radius: trackWidth * 0.5, startAngle: endAngle, endAngle: endAngle + CGFloat(M_PI), clockwise: !clockwise)
}
progressPath.addArc(withCenter: center, radius:radius-trackWidth, startAngle:endAngle, endAngle:startAngle, clockwise:clockwise)
if roundedCap {
let capCenter = CGPoint(x: center.x + r * cos(startAngle), y: center.y + r * sin(startAngle))
progressPath.addArc(withCenter: capCenter, radius: trackWidth * 0.5, startAngle: startAngle, endAngle: startAngle + CGFloat(M_PI), clockwise: clockwise)
}
As it said in title.
Is it possible to draw a round corner for the circle ?
I was trying to use CircleProgressView in IB. But it doesn't show up and I've got these warnings:
warning: IB Designables: Using class UIView for object with custom class because the class CircleProgressView does not exist
warning: IB Designables: Ignoring user defined runtime attribute for key path "trackWidth" on instance of "UIView". Hit an exception when attempting to set its value: [...]: this class is not key value coding-compliant for the key trackWidth.
Hi,
Thank you very much for this nice pod. Any reason why you have included the a view controller and an app delegate in your pod?
'M_PI' is deprecated: Please use 'Double.pi' or '.pi' to get the value of correct type and avoid casting.
Hi CardinalNow,
thank you very much for your work.
In your podspec you write:
s.source_files = 'CircleProgressView/*'
This value should be ProgressView/*
.
Because source file CircleProgressView.swift is in ProgressView folder.
And CircleProgressView folder only contains the demo.
Using Objc version and Xcode 6.4. When adding a UIView and setting the class to CircleProgressView it just displays a black circle and its not possible to recreate the blue and grey track colours shown in the readme.
I am implementing circleProgressView in swift but I can't update progress instantly.
Could you please assist here?
Hi!
Right now it seems like it's impossible to make the progress view inherit the background of the superview which contains it, because you can see the track fill color (as it seems like the center fill color covers the circular progress track color) it's possible to make it transparent and I'm not knowing how or it could be added as a feature?
Argument of '#selector' refers to instance method 'displayLinkTick()' that is not exposed to Objective-C
Class affected: CircleProgressView.
Is this library support for swift 2.0?
Could you mention the steps to get the Obj C version.- not the obj C directive -referring to closed issue
Also would you improve on this and add multiple sliders to the same.( each slider will show a different color on different portion of screen)
Hello,
great job on the progress view, I really love it. I used it in a small interval timer app. Do I have your permission to publish the app (using your CircleProgressView) to the AppStore? The app will be free and I don't plan on making any money with it, it should only act as a portfolio for future job applications as I am a student looking for internships.
Looking forward to hearing back from you,
Steve
Thanks for the good library,But, I want to add two labels inside circle, how can I add, and I want to show some animation while loading the circle, we are not using swift button to increase value, I have some Integer value, while loading that value I want to show some kind animation like loading circle.
Can you suggest me, how to go this?
@xrolfex
Can this be used as an animated countdown timer?
I cant seem to make it run that way?
Thanks
I am trying to have 2+ instances of the circle progress view in my app, but while creating the second instance xcode will lockup and never recover. Any guidance would be appreciated.
I initialize it as
@IBOutlet var circleProgressView: CircleProgressView!
but i get error: Use of undeclared type 'CircleProgressView'
Can you please advice?
Im in swift 3.2
for the anti clockwise movement should flipped the drawing direction of the progress view
I think we could have something better than * CircleProgressView* as a description
Is there any way to animate the change? Is tried UIView.animate(withDuration:)
and CATransaction
without success.
Hi,
whan I want to assign properties to CircleProgressView class instance, Xcode tells me this: "Unknown class CircleProgressView in Interface Builder file."
I am assigning it in cell like this:
cell.circleProgressView.progress = 0.64
In cell class I have this connected with storyboard:
@IBOutlet weak var circleProgressView: CircleProgressView!
I have no solition yet, nothing works for me. Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.