Latest 1.0
Homepage https://github.com/Dywane/DWBarHUD
License MIT
Platforms ios 9.0
Authors

default-default

DWBarHUD is a Swfit based top bar HUD for iOS 9 and above, support iPhoneX.

Features

  • Fully customizable.
  • Show on top of view controlles.
  • Four styles suit all needs.
  • Present/Dismiss animation.

failed-fade

success-default

warning-spring

Installation

You want to add pod 'DWBarHUD', '~> 1.0' similar to the following to your Podfile:

target 'MyApp' do
  pod 'DWBarHUD', '~> 1.0'
end

Then run a pod install inside your terminal, or from CocoaPods.app.

Alternatively to give it a test run, run the command:pod try DWBarHUD

Usage

In any UIViewController, you need to import the module first

import DWBarHUD

Then you can show an HUD and automatic disappear like this:

DWBarHUD.showHUD(message: "This is a message", type: .success)

Customization

There are many properties you can customize.

  • DWBarHUD.sharedHUD.config.animationDuration defines how long to present the HUD animation
  • DWBarHUD.sharedHUD.config.displayDuration defines how long the HUD show
  • DWBarHUD.sharedHUD.config.barHeight defines the height of the HUD
  • DWBarHUD.sharedHUD.config.animationType defines the HUD animation type
  • DWBarHUD.sharedHUD.config.barSuccessIcon & DWBarHUD.sharedHUD.config.barSuccessColor this two define success type’s icon and color

more can be seen in Xcode

Requirements

  • iOS 9.0+
  • Swift 4
  • Xcode 9

Contribution

You are welcome to fork and submit pull requests or issues.

License

DWBarHUD is open-sourced software licensed under the MIT license.

Credits

DWBarHUD is owned and maintained by Duwei

Latest podspec

{
    "name": "DWBarHUD",
    "version": "1.0",
    "summary": "A Swift based top bar HUD for iOS 9 and above, support iPhoneX",
    "homepage": "https://github.com/Dywane/DWBarHUD",
    "screenshots": [
        "https://github.com/Dywane/DWBarHUD/raw/master/GIF/default-default.gif",
        "https://github.com/Dywane/DWBarHUD/raw/master/GIF/fail-fade.gif",
        "https://github.com/Dywane/DWBarHUD/raw/master/GIF/success-default.gif",
        "https://github.com/Dywane/DWBarHUD/raw/master/GIF/warning-spring.gif"
    ],
    "license": "MIT",
    "authors": {
        "Dywane": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/Dywane/DWBarHUD.git",
        "tag": "1.0"
    },
    "source_files": "DWBarHUDDemo/DWBarHUD/**/*.{h,swift}",
    "resources": "DWBarHUDDemo/DWBarHUD/*.xcassets",
    "pushed_with_swift_version": "4"
}

Pin It on Pinterest

Share This