ajaybhanushali / abgaugeviewkit Goto Github PK
View Code? Open in Web Editor NEWABGaugeViewKit is a framework which will help you to add Gauge View in your iOS App.
License: MIT License
ABGaugeViewKit is a framework which will help you to add Gauge View in your iOS App.
License: MIT License
I am trying to remove the blink at the start of the animation (on viewDidLoad) but it is not working. Any idea why?
I've the same problem @AjayBhanushali
I'm going step by step -> medium
Originally posted by @mahdigh99 in #1 (comment)
Hello Ajay! This is great. I'm excited to use it in my app =). I've implemented it and am able to change all values needed. I'd like to be able to adjust the animation values. Is this possible? The needle "bounces" more than I'd like it to. Would it be possible to have it approach the value and bounce less and more smoothly? Thanks!
I am not able to install the library using Cocoapods
seems like this function
func createArcWith(startAngle: CGFloat, endAngle: CGFloat, arcCap: CGLineCap, strokeColor: UIColor, center:CGPoint) {
// 1
let center = center
let radius: CGFloat = max(bounds.width, bounds.height)/2 - self.frame.width/20
let lineWidth: CGFloat = self.frame.width/10
// 2
let path = UIBezierPath(arcCenter: center,
radius: radius,
startAngle: startAngle,
endAngle: endAngle,
clockwise: true)
// 3
path.lineWidth = lineWidth
path.lineCapStyle = arcCap
strokeColor.setStroke()
path.stroke()
}
throws the error for invalid context 0x0
Is It possible to create the gauge programatically
I want to animate arc while drawing on the view.
I tried with CAShapeLayer and CABasicAnimation but no luck.
This is what I tried.
func createArcWithAnimate(startAngle: CGFloat, endAngle: CGFloat, arcCap: CGLineCap, strokeColor: UIColor, center:CGPoint)
{
let slayer = CAShapeLayer()
let center = center
let radius: CGFloat = max(bounds.width, bounds.height)/2 - self.frame.width/20
let startAngle: CGFloat = startAngle
let endAngle: CGFloat = endAngle
slayer.path = UIBezierPath(arcCenter: center,
radius: radius,
startAngle: startAngle,
endAngle: endAngle,
clockwise: true).cgPath
// slayer.lineWidth = 15.0
slayer.lineCap = CAShapeLayerLineCap.round
slayer.strokeColor = UIColor.blue.cgColor
slayer.fillColor = UIColor.clear.cgColor
layer.addSublayer(slayer)
slayer.strokeEnd = 0.0
let animation = CABasicAnimation(keyPath: "transform.rotation.z")
animation.duration = 05.0 //Customize the time of your animation here.
animation.fromValue = startAngle
animation.toValue = endAngle
animation.timingFunction = CAMediaTimingFunction(name:
CAMediaTimingFunctionName.linear)
slayer.strokeEnd = 1.0
slayer.add(animation, forKey: nil)
}
Hi there, can you fix this error?
.../Base.lproj/Main.storyboard: error: IB Designables: Failed to render and update auto layout status for ViewController (BYZ-38-t0r): dlopen(ABGaugeViewKit.framework, 1): no suitable image found. Did find: ABGaugeViewKit.framework: required code signature missing for 'ABGaugeViewKit.framework'
Whenever I change the needleValue the needle springs back to zero and from there animates to the designated position. Am I doing something wrong by updating the value with
view.needleValue = 3
Hello,! Thank you for this beautiful library. I just wonder if this library could support iOS 10?
As of now, a considerable amount of users still run on iOS 10.
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.