Giter Club home page Giter Club logo

apesuperhud's Introduction

APESuperHUD

A simple way to display a HUD with a message or progress information in your application.

APESuperHUD

Features

  • Simplicity.
  • Customizable. See Change appearance.
  • Fully written in Swift.
  • Unit tests.

Requirements

  • iOS 8 or later.
  • Xcode 8 (Swift 3.0) or later. For Swift 2.2 use version 0.6

Installation

CocoaPods

You can use CocoaPods to install APESuperHUD by adding it to your Podfile:

platform :ios, '8.0'
use_frameworks!

target 'MyApp' do
    pod 'APESuperHUD', :git => 'https://github.com/apegroup/APESuperHUD.git'
end

Note that this requires CocoaPods version 36, and your iOS deployment target to be at least 8.0:

Carthage

You can use Carthage to install APESuperHUD by adding it to your Cartfile:

github "apegroup/APESuperHUD"

Usage

Don't forget to import.

import APESuperHUD

Show message HUD

With default icon
APESuperHUD.showOrUpdateHUD(icon: .email, message: "1 new message", duration: 3.0, presentingView: self.view, completion: { _ in
    // Completed
})
With custom image
APESuperHUD.showOrUpdateHUD(icon: UIImage(named: "apegroup")!, message: "Demo message", duration: 3.0, presentingView: self.view, completion: { _ in
    // Completed
})
With Title
APESuperHUD.showOrUpdateHUD(title: "Title", message: "Demo message", presentingView: self.view) { _ in
    // Completed
}

Show HUD with loading indicator

With loading text
APESuperHUD.showOrUpdateHUD(loadingIndicator: .standard, message: "Demo loading...", presentingView: self.view)
Without loading text
APESuperHUD.showOrUpdateHUD(loadingIndicator: .standard, message: "", presentingView: self.view, completion: nil)
With funny loading texts
APESuperHUD.showOrUpdateHUD(loadingIndicator: .standard, funnyMessagesLanguage: .english, presentingView: self.view)

Remove HUD

APESuperHUD.removeHUD(animated: true, presentingView: self.view, completion: { _ in
    // Completed
})

Change appearance

APESuperHUD.appearance.cornerRadius = 12
APESuperHUD.appearance.animateInTime = 1.0
APESuperHUD.appearance.animateOutTime = 1.0
APESuperHUD.appearance.backgroundBlurEffect = .none
APESuperHUD.appearance.iconColor = UIColor.green
APESuperHUD.appearance.textColor =  UIColor.green
APESuperHUD.appearance.loadingActivityIndicatorColor = UIColor.green
APESuperHUD.appearance.defaultDurationTime = 4.0
APESuperHUD.appearance.cancelableOnTouch = true
APESuperHUD.appearance.iconWidth = 48
APESuperHUD.appearance.iconHeight = 48
APESuperHUD.appearance.messageFontName = "Caviar Dreams"
APESuperHUD.appearance.titleFontName = "Caviar Dreams"
APESuperHUD.appearance.titleFontSize = 22
APESuperHUD.appearance.messageFontSize = 14

Contributing

All people are welcome to contribute. See CONTRIBUTING for details.

License

APESuperHUD is released under the MIT license. See LICENSE for details.

apesuperhud's People

Contributors

danielnilssongithub avatar sudeepsidhu avatar erifa avatar binarydennis avatar readmecritic avatar bryant1410 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.