Latest 1.0.1
Homepage https://github.com/leo-lp/LPProgressHUD
License MIT
Platforms ios 8.0
Authors

LPProgressHUD is a Swift version of the HUD that mimics MBProgressHUD.






Requirements

  • iOS 8.0+
  • Xcode 8.1+
  • Swift 3.0+

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate LPProgressHUD into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

target '<Your Target Name>'  do
    pod 'LPProgressHUD', '~> 1.0.1’
end

Then, run the following command:

$ pod install

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate LPProgressHUD into your Xcode project using Carthage, specify it in your Cartfile:

github "leo-lp/LPProgressHUD"

Run carthage update to build the framework and drag the built LPProgressHUD.framework into your Xcode project.

Manually

If you prefer not to use either of the aforementioned dependency managers, you can integrate LPProgressHUD into your project manually.


Usage

Use MBProgressHUD to set up on the main thread and then switch the task to be performed to the new thread.

let hud = LPProgressHUD.show(to: view, animated: true)
DispatchQueue.global().async {
    // Do something...
    DispatchQueue.main.sync {
        hud.hide(animated: true)
    }
}

For more examples, including how to use LPProgressHUD with asynchronous operations, take a look at the bundled Example project.

License

This code is distributed under the terms and conditions of the MIT license.

Latest podspec

{
    "name": "LPProgressHUD",
    "version": "1.0.1",
    "summary": "LPProgressHUD is a Swift version of the HUD that mimics MBProgressHUD.",
    "homepage": "https://github.com/leo-lp/LPProgressHUD",
    "license": "MIT",
    "authors": {
        "leo-lp": "lipengmjy@163.com"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/leo-lp/LPProgressHUD.git",
        "tag": "1.0.1"
    },
    "source_files": "LPProgressHUD/Sources/*.swift",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This