Giter Club home page Giter Club logo

abgaugeviewkit's People

Contributors

ajaybhanushali avatar kartiksatoskar 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

Watchers

 avatar  avatar  avatar  avatar  avatar

abgaugeviewkit's Issues

Animation help?

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!

CGContextSetStrokeColorWithColor: invalid context 0x0 error in swift

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

How to animate createArcWith function

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)
    
}

IB Error

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'

Needle Springs back to 0 when changing value

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

iOS 10 support?

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.

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.