To run the example project, clone the repo, and run pod install
from the Example directory first.
iOS 11.0 and above.
AnimateCircleView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'AnimateCircleView'
The graph with circle and label is named GraphView
. In GraphView
there is an access to AnimateLabel
and CircleView
.
In CircleView
there are two layers - staticLayer
and shapeLayer
. Only shapeLayer
is animating.
I really recommend use this in ViewController
to hide/show labels to smooth animation.
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransition(to: size, with: coordinator)
coordinator.animate(alongsideTransition: { [weak self] _ in
self?.graphView.showHideViews(show: false)
}) { [weak self] _ in
self?.graphView.showHideViews(show: true)
}
}
You need to set �maxValue
and animationDuration
. Then you can easily add value by method.
graphView.maxValue = 1600
graphView.animationDuration = 2.5
graphView.addValue(value: 200)
DavidKadlcek, [email protected]
AnimateCircleView is available under the MIT license. See the LICENSE file for more info.