Latest 0.1.1
Homepage https://github.com/bestiosdeveloper/PKProgressView
License MIT
Platforms ios 11.0
Authors

CocoaPods
codebeat badge

A Swift based helper class that will provide a progress view that can be used to fill it with animation, also can be used for car animation.

preview

Requirements

  • iOS 11.0+
  • Xcode 10.0+

Installation

For manual instalation, drag Source folder into your project.

or use CocoaPod adding this line to you Podfile:

pod 'PKProgressView'

Usage

Initialization:

PKProgressView can ne initated by code or can be assigned to UIView in Interface Builder

By Code:

Example:

let progressView = PKProgressView(frame: CGRect(x: 10.0, y: 20.0, width: 200.0, height: 5.0))

By IB (Interface Builder):

1) Just add and UIView on the UIViewController.
2) Assign the PKProgressView class to UIView.
3) Create an IBOutlet for the same view.

Example:

@IBOutlet weak var progressView: PKProgressView!

Set Progress

There are the following two way to set the progress:

With Animation:

Example:

1) Just call setProgress() method from instance of PKProgressView.
2) Pass the TimeInterval in seconds in how much seconds you want to fill the progress.

progressView.setProgress(progress: 1.0, inSeconds: 10.0)

Without Animation:

Example 1:

1) Just assign the progress value in progress property of PKProgressView instance.

progressView.progress = 0.3

Example 2:

1) Just call setProgress() method from instance of PKProgressView.
2) Pass the TimeInterval as 0.0.

progressView.setProgress(progress: 1.0, inSeconds: 0.0)

Configuration To Modify

To make some modification you can use the following properties, Like:

1) trackingImage used to assign the tracking image, that will shown above the progress bar. Default: nil

2) trackingImageSize used to give the size for the tracking image. Default: CGSize(width: 25.0, height: 25.0)

2) trackTint used to fill the background color of the progress view. Default: UIColor.lightGray

2) progressTint used to fill the progress of the progress view. Default: UIColor.blue

2) trackBorderWidth used to give the border for the progress view. Default: 0.0

2) progressBorderWidth used to give the border for progress of the progress view. Default: 0.0

2) trackBorderColor used to give the border color for the progress view. Default: UIColor.lightGray

2) progressBorderColor used to give the border color for progress of the progress view. Default: UIColor.blue

Licence

PKProgressView is released under the MIT license.

Latest podspec

{
    "name": "PKProgressView",
    "version": "0.1.1",
    "summary": "This framework will help you in implementing the progress view with animation.",
    "description": "A Swift based helper class that will provide a progress view that can be used to fill it with animation, also can be used for car animation.",
    "homepage": "https://github.com/bestiosdeveloper/PKProgressView",
    "screenshots": "https://github.com/bestiosdeveloper/PKProgressView/blob/master/PKProgressViewDemo/PKProgressView.gif",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Pramod Kumar": "[email protected]"
    },
    "social_media_url": "http://pramodkumar.cf/",
    "platforms": {
        "ios": "11.0"
    },
    "source": {
        "git": "https://github.com/bestiosdeveloper/PKProgressView.git",
        "tag": "0.1.1"
    },
    "source_files": "PKProgressViewDemo/PKProgressView/*"
}

Pin It on Pinterest

Share This