Git Product home page Git Product logo

vhud's Introduction

VHUD

Version Swift 5.0 Platforms iOS Xcode 10.2

Simple HUD.

Capture

VHUD is inspired by PKHUD.

Example

Show

import VHUD

func example() {
  var content = VHUDContent(.loop(3.0))
  content.loadingText = "Loading.."
  content.completionText = "Finish!"

  VHUD.show(content)
}

Dismiss

// duration, deley(Option), text(Option), completion(Option)
VHUD.dismiss(1.0, 1.0)

Mode

  • Loop
  • Duration
  • PercentComplete

Customization

Shape

  • circle
var content = VHUDContent(.loop(3.0))
content.shape = .circle
VHUD.show(content)

Capture

  • round
var content = VHUDContent(.loop(3.0))
content.shape = .round
VHUD.show(content)

Capture

And Custom (using closure)

Style

  • light
var content = VHUDContent(.loop(3.0))
content.shape = .circle
content.style = .light
VHUD.show(content)

Capture

  • dark
var content = VHUDContent(.loop(3.0))
content.shape = .circle
content.style = .dark
VHUD.show(content)

Capture

  • blur
var content = VHUDContent(.loop(3.0))
content.shape = .circle
content.style = .blur(.light)
VHUD.show(content)

Capture

Background

  • none
var content = VHUDContent(.loop(3.0))
content.shape = .circle
content.style = .blur(.light)
content.background = .none
VHUD.show(content)

Capture

  • color
var content = VHUDContent(.loop(3.0))
content.shape = .circle
content.style = .dark
content.background = .color(#colorLiteral(red: 0.937254902, green: 0.937254902, blue: 0.9568627451, alpha: 0.7))
VHUD.show(content)

Capture

  • blur
var content = VHUDContent(.loop(3.0))
content.shape = .circle
content.style = .light
content.background = .blur(.dark)
VHUD.show(content)

Capture

Requirements

  • Xcode 10+
OS Swift
v1.1.x iOS 8+ 3.0
v1.2.x iOS 8+ 3.2
v1.3.x iOS 9+ 4.1
v1.4.x iOS 9+ 4.2
v1.5.x iOS 10+ 5.0

Installation

CocoaPods

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

use_frameworks!
pod 'VHUD'

To get the full benefits import VHUD wherever you import UIKit

import UIKit
import VHUD

Carthage

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


github "xxxAIRINxxx/VHUD"

To get the full benefits import VHUD wherever you import UIKit

import UIKit
import VHUD

Manually

  1. Download and drop /Sources folder in your project.
  2. Congratulations!

License

MIT license. See the LICENSE file for more info.

vhud's People

Contributors

lfarah avatar maesepptarvo avatar xxxairinxxx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

vhud's Issues

Swift 3.1 deprecations

Hi,

There are three deprecations in you library on Swift 3.1. Could you fix those? It's basically changing M_PI to .pi :) i've fixed the issues but can't create a pull request (getting error 403)

Stop animating

Hey! I am trying to use your awesome library in my Firebase application. And I have one question, is there any way to manually stop animation if lets say, user is logged in etc.. I mean in completion block. Maybe even if content is downloaded, stop animation.

Start animating
FIRAuth.auth()?.signIn(withEmail: username, password: password, completion: { (user, error) in
if error != nil{
//Do something
}
stop animating
})

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.