Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

amosavian/PieKit

 
 

Repository files navigation

PieKit

A simple Pie view that can show all slices of a Pie 😊. Also,

It can be animated!

CI

Install

You can use the Swift package manager to install PieKit.

.package(url: "https://github.com/MojtabaHs/PieKit", .upToNextMajor(from: "0.2.0"))

Usage

PieKitis FREE and open-source for individuals, and will remain that way forever.

You can easily set the color and progress:

pieView.fillColor = .red
pieView.progress = 0.3

And just set the duration (for timedPie) and it will animate the progress down to 0.

timedPieView.duration = 3

Delegate

You can use the delegate method to access the progress changes when it is animating.

extension ViewController: TimedPieViewDelegate {

    func timedPie(_ pie: PieView, didChangeRemainingTime remainingTime: TimeInterval) {
        print(remainingTime)
    }
}

Note:

This method can cause a huge impact on performance. The called is responsible for preventing it from executing heavy instructions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 100.0%