Latest 0.4.0
Homepage https://github.com/mrdumnin/EGGProgressHUD
License MIT
Platforms ios 8.0
Authors

[![CI Status](http://img.shields.io/travis/Suchon Dumnin/EGGProgressHUD.svg?style=flat)](https://travis-ci.org/Suchon Dumnin/EGGProgressHUD)
Version
License
Platform

Requirements

EGGProgressHUD works on iOS 8.0+

Installation

EGGProgressHUD is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "EGGProgressHUD"
  1. Add a pod entry for EGGProgressHUD to your Podfile pod ‘EGGProgressHUD’
  2. Install the pod(s) by running pod install.

Screenshot

Alt Text
Alt Text
Alt Text
Alt Text

Usage(Swift 3.0)

To run the example project, clone the repo, and run pod install from the Example directory first.

Progress without BG

let a = EGGProgressHUD()
a.showInView(self.view)

let triggerTime = (Int64(NSEC_PER_SEC) * 5) //5 Sec
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(triggerTime) / Double(NSEC_PER_SEC)) {
    a.hide()
}

Progress with BG

let a = EGGProgressHUD()
a.type = EGGProgressHUD.ProgressType.progressWithBG
a.style = EGGProgressHUD.SpinnerStyle.white
a.bgColor = UIColor.gray

a.showInView(self.view)

let triggerTime = (Int64(NSEC_PER_SEC) * 5) //5 Sec
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(triggerTime) / Double(NSEC_PER_SEC)) {
    a.hide()
}

Progress view

fileprivate var i = 0.0
fileprivate var timer: Timer!
fileprivate var a: EGGProgressHUD!

override func viewDidDisappear(_ animated: Bool) {
    self.timer.invalidate()
}

override func viewDidLoad() {
    super.viewDidLoad()

    // Do any additional setup after loading the view.
    self.a = EGGProgressHUD()
    self.a.type = EGGProgressHUD.ProgressType.progressView
    self.a.bgColor = UIColor.gray
    self.a.loadingTextColor = UIColor.white
    self.a.showInView(self.view)

    self.timer = Timer.scheduledTimer(
                    timeInterval: 1.0, target: self, selector: #selector(self.updateProgress),
                    userInfo: nil, repeats: true
                )
    self.timer.fire()
}

func updateProgress() {

    i = i + 0.1

    if i > 1.0 {
        self.a.setProgress(Float(self.i))
        i = 0.1
    } else {
        self.a.setProgress(Float(self.i))
    }
}

Progress image

let a = EGGProgressHUD()
a.type = EGGProgressHUD.ProgressType.progressImage
a.showInView(self.view)

let triggerTime = (Int64(NSEC_PER_SEC) * 5) //5 Sec
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(triggerTime) / Double(NSEC_PER_SEC)) {

}

Author

Suchon Dumnin, [email protected]

License

EGGProgressHUD is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "EGGProgressHUD",
    "version": "0.4.0",
    "summary": "EGGProgressHUD is simply progress dialog for ongoing task on iOS.",
    "description": "EGGProgressHUD is simply progress dialog for ongoing task on iOS. It clean and easy-to-use you can apply to your project.",
    "homepage": "https://github.com/mrdumnin/EGGProgressHUD",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Suchon Dumnin": "[email protected]"
    },
    "source": {
        "git": "https://github.com/mrdumnin/EGGProgressHUD.git",
        "tag": "0.4.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "EGGProgressHUD/Classes/**/*",
    "resources": "EGGProgressHUD/Assets/EGGProgressHUDResource.bundle",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This