UIView
ConcentricProgressRingView, - , .
https://github.com/lionheart/ConcentricProgressRingView
, :
UIViewController
:
import ConcentricProgressRingView
viewDidLoad
:
let rings = [
ProgressRing(color: UIColor(.RGB(232, 11, 45)), backgroundColor: UIColor(.RGB(34, 3, 11))),
ProgressRing(color: UIColor(.RGB(137, 242, 0)), backgroundColor: UIColor(.RGB(22, 33, 0))),
ProgressRing(color: UIColor(.RGB(0, 200, 222)), backgroundColor: UIColor(.RGB(0, 30, 28)))
]
let progressRingView = try! ConcentricProgressRingView(center: view.center, radius: radius, margin: margin, rings: rings, defaultColor: UIColor.clearColor(), defaultWidth: 18)
view.addSubview(progressRingView)
ConcentricProgressRingView
, setProgress
.
ring.arcs[1].setProgress(0.5, duration: 2)
, , , CABasicAnimation , . , . , !