kkp

KKProgressToolbar

KKProgressToolbar is an iOS drop-in class that displays a translucent UIToolbar with a progress indicator and some optional labels while work is being done in a background thread

Showing:

Popularity

Downloads/wk

0

GitHub Stars

63

Maintenance

Last Commit

1yr ago

Contributors

2

Package

Dependencies

2

License

MIT

Categories

Readme

KKProgressToolbar

KKProgressToolbar is an iOS toolbar library

Build Status Cocoapods Swift Xcode MIT

   

Demo

build and run the KKProgressToolbarExample project in Xcode to see KKProgressToolbar in action.

Installation

The recommended approach for installing SocialAccounts is via the CocoaPods package manager, as it provides flexible dependency management and dead simple installation.

Install CocoaPods if not already available:

$ [sudo] gem install cocoapods
$ pod setup

Edit your Podfile and add KKProgressToolbar:

$ edit Podfile
platform :ios, '12.0'

pod 'KKProgressToolbar'

Install into your Xcode project:

$ pod install

Add import KKProgressToolbar" to the top of classes that will use it.

Example Usage

Showing and Hiding the toolbar


class ViewController: UIViewController {
    
    lazy fileprivate var loadingToolbar: KKProgressToolbar = {
        let view = KKProgressToolbar()
        view.progressBar.barBorderColor = .black
        view.progressBar.barBackgroundColor = .black
        view.progressBar.barBorderWidth = 1
        view.progressBar.barFillColor = .white
        view.isHidden = true
        return view
    }()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        loadingToolbar.actionDelegate = self
        loadingToolbar.frame = CGRect(x: 0, y: view.bounds.size.height, width: view.bounds.size.width, height: 55)
        view.addSubview(loadingToolbar)
        
    }
    
    @IBAction func showToolbar(_ sender: Any) {
        loadingToolbar.show(true, completion: nil)
        loadingToolbar.text = NSLocalizedString("Loading...", comment: "")
        loadingToolbar.progressBar.progress = 0.5
    }
    
    @IBAction func hideToolbar(_ sender: Any) {
        loadingToolbar.hide(true, completion: nil)
    }
}

// MARK: - KKProgressToolbarDelegate
extension ViewController: KKProgressToolbarDelegate {
    func didCancelButtonPressed(_ toolbar: KKProgressToolbar) {
        
    }
}

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100