All Projects → apegroup → Apesuperhud

apegroup / Apesuperhud

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

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Apesuperhud

Svprogresshud
A clean and lightweight progress HUD for your iOS and tvOS app.
Stars: ✭ 12,339 (+7809.62%)
Mutual labels:  cocoapods, carthage, progress, hud
Lcprogresshud
一个超简单的活动指示器。适配横屏。
Stars: ✭ 100 (-35.9%)
Mutual labels:  cocoapods, progress, hud
Swiftprogresshud
📦 SwiftProgressHUD is a user-friendly pure swift HUD. 支持Cocoapods 及 Carthage
Stars: ✭ 290 (+85.9%)
Mutual labels:  cocoapods, carthage, hud
Jgprogresshud
An elegant and simple progress HUD for iOS and tvOS, compatible with Swift and ObjC.
Stars: ✭ 3,110 (+1893.59%)
Mutual labels:  cocoapods, carthage, hud
Ftindicator
A light wight UI package contains local notification, progress HUD, toast, with blur effect, elegant API and themes support.
Stars: ✭ 292 (+87.18%)
Mutual labels:  cocoapods, progress, hud
Arslineprogress
iOS progress bar, replacement for the default activity indicator.
Stars: ✭ 434 (+178.21%)
Mutual labels:  cocoapods, carthage, progress
Multiprogressview
📊 An animatable view that depicts multiple progresses over time. Modeled after UIProgressView
Stars: ✭ 614 (+293.59%)
Mutual labels:  cocoapods, carthage, progress
Swiftloader
A simple and beautiful activity indicator written in Swift
Stars: ✭ 116 (-25.64%)
Mutual labels:  cocoapods, progress, spinner
Contentful.swift
A delightful Swift interface to Contentful's content delivery API.
Stars: ✭ 132 (-15.38%)
Mutual labels:  cocoapods, carthage
Poliopager
A flexible TabBarController with search tab like SNKRS.
Stars: ✭ 133 (-14.74%)
Mutual labels:  cocoapods, carthage
Ihprogresshud
A clean and lightweight progress HUD based on SVProgressHUD, converted to Swift with the help of Swiftify.
Stars: ✭ 135 (-13.46%)
Mutual labels:  cocoapods, hud
Switch
💊 An iOS switch control implemented in Swift with full Interface Builder support
Stars: ✭ 132 (-15.38%)
Mutual labels:  cocoapods, carthage
Coregpx
A library for parsing and creation of GPX location files. Purely Swift.
Stars: ✭ 132 (-15.38%)
Mutual labels:  cocoapods, carthage
Eureka
Elegant iOS form builder in Swift
Stars: ✭ 11,345 (+7172.44%)
Mutual labels:  cocoapods, carthage
Natrium
A pre-build (Swift) script to alter your Xcode project at pre-build-time per environment, build configuration and target.
Stars: ✭ 131 (-16.03%)
Mutual labels:  cocoapods, carthage
Sffocusviewlayout
UICollectionViewLayout with focused content
Stars: ✭ 1,760 (+1028.21%)
Mutual labels:  cocoapods, carthage
Color
Color utilities for macOS, iOS, tvOS, and watchOS
Stars: ✭ 145 (-7.05%)
Mutual labels:  cocoapods, carthage
Vue Loaders
Vue + loaders.css
Stars: ✭ 127 (-18.59%)
Mutual labels:  progress, spinner
Closures
Swifty closures for UIKit and Foundation
Stars: ✭ 1,720 (+1002.56%)
Mutual labels:  cocoapods, carthage
Heapinspector For Ios
Find memory issues & leaks in your iOS app without instruments
Stars: ✭ 1,819 (+1066.03%)
Mutual labels:  cocoapods, carthage

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 9 or later.
  • Xcode 9 (Swift 4.1) or later.
    • For Swift 3.0 use version 1.1.3
    • 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, '9.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 9.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 hud with icon

let image = UIImage(named: "apegroup")!
APESuperHUD.show(style: .icon(image: image, duration: 3.0), title: "Hello", message: "world")

// Or create a instance of APESuperHud

/*
let hudViewController = APESuperHUD(style: .icon(image: image, duration: 3), title: "Hello", message: "world")
present(hudViewController, animated: true)
*/

Show hud with loading indicator

APESuperHUD.show(style: .loadingIndicator(type: .standard), title: nil, message: "Loading...")

DispatchQueue.main.asyncAfter(deadline: .now() + 3.0, execute: {
    APESuperHUD.dismissAll(animated: true)
})

// Or create a instance of APESuperHud

/*
let hudViewController = APESuperHUD(style: .loadingIndicator(type: .standard), title: nil, message: "Loading...")
present(hudViewController, animated: true)

DispatchQueue.main.asyncAfter(deadline: .now() + 3.0, execute: {
    hudViewController.dismiss(animated: true)
})
*/

Show hud with title and message

APESuperHUD.show(style: .textOnly, title: "Hello", message: "world")

DispatchQueue.main.asyncAfter(deadline: .now() + 3.0, execute: {
    APESuperHUD.dismissAll(animated: true)
})

// Or create a instance of APESuperHud

/*
let hudViewController = APESuperHUD(style: .textOnly, title: "Hello", message: "world")
present(hudViewController, animated: true)

DispatchQueue.main.asyncAfter(deadline: .now() + 3.0, execute: {
    hudViewController.dismiss(animated: true)
})
*/

Show hud with updates

APESuperHUD.show(style: .loadingIndicator(type: .standard), title: nil, message: "Loading...")

DispatchQueue.main.asyncAfter(deadline: .now() + 3.0, execute: {
    APESuperHUD.show(style: .textOnly, title: "Done loading", message: nil)

    DispatchQueue.main.asyncAfter(deadline: .now() + 3.0, execute: {
        let image = UIImage(named: "apegroup")!
        APESuperHUD.show(style: .icon(image: image, duration: 3.0), title: nil, message: nil)
    })
})

Change appearance

/// Text color of the title text inside the HUD
HUDAppearance.titleTextColor = UIColor.black

/// Text color of the message text inside the HUD
HUDAppearance.messageTextColor = UIColor.black

/// The color of the icon in the HUD
HUDAppearance.iconColor = UIColor.black

/// The background color of the view where the HUD is presented
HUDAppearance.backgroundColor = UIColor.black.withAlphaComponent(0.5)

/// The background color of the HUD view
HUDAppearance.foregroundColor = UIColor.white

/// The color of the loading indicator
HUDAppearance.loadingActivityIndicatorColor = UIColor.gray

/// The corner radius of the HUD
HUDAppearance.cornerRadius = 10.0

/// Enables/disables shadow effect around the HUD
HUDAppearance.shadow = true

/// The shadow color around the HUD
HUDAppearance.shadowColor = UIColor.black

/// The shadow offset around the HUD
HUDAppearance.shadowOffset = CGSize(width: 0, height: 0)

/// The shadow radius around the HUD
HUDAppearance.shadowRadius = 6.0

/// The shadow opacity around the HUD
HUDAppearance.shadowOpacity = 0.15

/// Enables/disables removal of the HUD if the user taps on the screen
HUDAppearance.cancelableOnTouch = true

/// The info message font in the HUD
HUDAppearance.messageFont = UIFont.systemFont(ofSize: 13, weight: .regular)

/// The title font in the HUD
HUDAppearance.titleFont = UIFont.systemFont(ofSize: 20, weight: .bold)

/// The size of the icon inside the HUD
HUDAppearance.iconSize = CGSize(width: 48, height: 48)

/// The HUD size
HUDAppearance.hudSize = CGSize(width: 144, height: 144)

/// The HUD fade in duration
HUDAppearance.animateInTime = 0.7

/// The HUD fade out duration
HUDAppearance.animateOutTime = 0.7

Contributing

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

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].