This is a beauful hud view for iPhone & iPad

Overview

WSProgressHUD

This is a beauful hud view for iPhone & iPad

CI Status Version License Platform Carthage compatible

Example

Usage

To Download the project. Run the WSProgressHUD.xcodeproj in the demo directory.

    [WSProgressHUD show];
    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
        ...

        dispatch_async(dispatch_get_main_queue(), ^{
        ...
        [WSProgressHUD dismiss];
        });
    });

//Show on the self.view

@implementation ViewController
{
    WSProgressHUD *hud;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.

    //Add HUD to view
    hud = [[WSProgressHUD alloc] initWithView:self.navigationController.view];
    [self.view addSubview:hud];

    //show
    [hud showWithString:@"Wating..." maskType:WSProgressHUDMaskTypeBlack];

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [hud dismiss];
    });

}

//Show on the window
    //show
    [WSProgressHUD show];

    //Show with mask
    [WSProgressHUD showWithMaskType:WSProgressHUDMaskTypeBlack];
    
    //Show with mask without tabbar
    [WSProgressHUD showWithStatus:@"Loading..." maskType:WSProgressHUDMaskTypeBlack maskWithout:WSProgressHUDMaskWithoutTabbar];
    
    //Show with string
    [WSProgressHUD showWithStatus:@"Loading..."];

    //Show with facebook shimmering
    [WSProgressHUD showShimmeringString:@"WSProgressHUD Loading..."];

    //Show with Progress
    [WSProgressHUD showProgress:progress status:@"Updating..."];

    //Show with image
    [WSProgressHUD showSuccessWithStatus:@"Thanks.."];
    
    //Show with string
    [WSProgressHUD showImage:nil status:@"WSProgressHUD"]

    //Dismiss
    [WSProgressHUD dismiss];
    
    //And There have 3 indicator style for your choice
    [WSProgressHUD setProgressHUDIndicatorStyle:WSProgressHUDIndicatorSmall] //small custom spinner

Installation

From CocoaPods

WSProgressHUD is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'WSProgressHUD'

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate WSProgressHUD into your Xcode project using Carthage, specify it in your Cartfile:

github "devSC/WSProgressHUD"

Run carthage update to build the framework and drag the built WSProgressHUD.framework (in Carthage/Build/iOS folder) into your Xcode project (Linked Frameworks and Libraries in Targets).

Manually

Drag the WSProgressHUD/Demo/WSProgressHUD folder into your project. Then take care that WSProgressHUD.bundle is added to Targets->Build Phases->Copy Bundle Resources. Add the QuartzCore framework to your project.

Swift

Even though WSProgressHUD is written in Objective-C, it can be used in Swift with no hassle. If you use CocoaPods add the following line to your Podfile:

use_frameworks!

If you added WSProgressHUD manually, just add a bridging header file to your project with the WSProgressHUD header included.

Thanks

@Shimmering @SVProgressHUD @MMMaterialDesignSpinner

Author

Wilson-Yuan, [email protected]

License

WSProgressHUD is available under the MIT license. See the LICENSE file for more info.

Comments
  • dismiss 方法执行后没有“立刻”消失,导致后面show出来的alert瞬间消失

    dismiss 方法执行后没有“立刻”消失,导致后面show出来的alert瞬间消失

    当前的场景是,开始网络请求,转菊花,响应之后结束菊花,同时开始进行数据验证,验证错误弹出text alert,3秒之后让其消失。

    可是现在的效果是,结束菊花后,菊花没有立刻消失,等到验证错误弹出后才消失,导致现在验证错误只显示了一瞬间。

    示例代码大概是这样,请问是我用法有误吗?

    [WSProgressHUD show];
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [WSProgressHUD dismiss];
        [WSProgressHUD showImage:nil status:@"晕???"];
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
            [WSProgressHUD dismiss];
        });
    });
    
    opened by siegrainwong 3
  • 加在view上,dismiss后没有在view上移除导致内存泄漏

    加在view上,dismiss后没有在view上移除导致内存泄漏

    比如如下写法:

    WSProgressHUD *hud = [[WSProgressHUD alloc]initWithView:view];
    [view addSubview:hud];
    [hud showImage:nil status:text maskType:WSProgressHUDMaskTypeDefault];
    
    显示后会自动调用dismiss方法。但是该方法中没有[self removeFromSuperview]。导致hud一直存在view上,占用内存
    不知道我的使用方法是否有误,如果有误,请指正
    
    opened by heyehao2008 2
  • WSProgressHUDMaskTypeClear

    WSProgressHUDMaskTypeClear

    case WSProgressHUDMaskTypeClear: { CGContextRef context = UIGraphicsGetCurrentContext(); [[UIColor colorWithWhite:0 alpha:0.5] set]; CGRect bounds = self.bounds; CGContextFillRect(context, bounds); aplha 应该为0

    opened by mf168 2
  • Add Shimmering as a Podspec dependency

    Add Shimmering as a Podspec dependency

    I think it's safer to have Shimmering as a dependency on your Podspec. Otherwise one can get duplicate symbol errors they are already using Shimmering in their project.

    opened by kaandedeoglu 2
  • Fix broken headings in Markdown files

    Fix broken headings in Markdown files

    GitHub changed the way Markdown headings are parsed, so this change fixes it.

    See bryant1410/readmesfix for more information.

    Tackles bryant1410/readmesfix#1

    opened by bryant1410 1
  • pod codes is different with your demo code?

    pod codes is different with your demo code?

    there are some methods for show images in cocopods

    #pragma mark - Show image
    
    + (void)showSuccessWithStatus: (NSString *)string
    {
        [self showImage:WSProgressHUDSuccessImage status:string];
    }
    
    + (void)showErrorWithStatus: (NSString *)string
    {
        [self showImage:WSProgressHUDErrorImage status:string];
    }
    
    
    + (void)showImage:(UIImage *)image status:(NSString *)title
    {
        [self showImage:image status:title maskType:WSProgressHUDMaskTypeDefault];
    }
    
    + (void)showImage:(UIImage *)image status:(NSString *)title maskType: (WSProgressHUDMaskType)maskType
    {
        [self showImage:image status:title maskType:maskType maskWithout:WSProgressHUDMaskWithoutDefault];
    }
    
    

    methods for show images in demo

    #pragma mark - Show image
    
    + (void)showSuccessWithStatus: (NSString *)string
    {
        [[self shareInstance] addOverlayViewToWindow];
        [self showImage:WSProgressHUDSuccessImage status:string];
    }
    
    + (void)showErrorWithStatus: (NSString *)string
    {
        [[self shareInstance] addOverlayViewToWindow];
        [self showImage:WSProgressHUDErrorImage status:string];
    }
    
    + (void)showImage:(UIImage *)image status:(NSString *)title
    {
        [[self shareInstance] addOverlayViewToWindow];
        [self showImage:image status:title maskType:WSProgressHUDMaskTypeDefault];
    }
    
    + (void)showImage:(UIImage *)image status:(NSString *)title maskType: (WSProgressHUDMaskType)maskType
    {
        [[self shareInstance] addOverlayViewToWindow];
        [self showImage:image status:title maskType:maskType maskWithout:WSProgressHUDMaskWithoutDefault];
    }
    
    

    addOverlayViewToWindow didn't called obviously. this issue will cause the bug which can't show WSProgressHUDSuccessImage or WSProgressHUDErrorImage when call [WSProgressHUD showErrorWithStatus:@"msg"]; or [WSProgressHUD showSuccessWithStatus:@"msg"]

    my environment: Xcode7.2.1, iOS9.2, pod version:1.1.0

    opened by litt1e-p 1
  • 您好,在 Podfile 加入 :generate_multiple_pod_projects => true 之后,编译不能通过

    您好,在 Podfile 加入 :generate_multiple_pod_projects => true 之后,编译不能通过

    我在 Podfile 中加入以下代码:

    install! 'cocoapods',
      :deterministic_uuids => false,
      :disable_input_output_paths => true,
      :generate_multiple_pod_projects => true
    

    在编译的时候报错:'FBShimmeringView.h' file not found 截图如下: image

    WSProgressHUD 版本为 1.1.5

    opened by angelen10 1
Releases(1.1.2)
Owner
Wilson
Discover & Learn.
Wilson
Simple Swift Progress HUD

MKProgress An iOS Simple Swift Progress HUD Requirements iOS 9.0+ Swift 3.0+ Xcode 8.0+ Installation MKProgress is only available via CocoaPods: pod '

Muhammad Kamran 143 Dec 23, 2022
A clean and lightweight progress HUD based on SVProgressHUD, converted to Swift with the help of Swiftify.

IHProgressHUD IHProgressHUD is a clean and easy-to-use HUD meant to display the progress of an ongoing task on iOS and tvOS. IHProgressHUD is based on

Swiftify 202 Dec 22, 2022
IOS HUD Swift Library

JHProgressHUD JHProgressHUD is an iOS class written in Swift to display a translucent HUD with an indicator and/or labels while work is being done in

Harikrishnan T 79 Feb 27, 2021
A view class for iOS that makes uploading easy and beautiful.

SVUploader A view class for iOS that makes uploading easy and beautiful. Demo SVUploader is fully customizable - check out 2 demos. Installation Just

Kiran 79 Apr 18, 2022
Step-by-step progress view with labels and shapes. A good replacement for UIActivityIndicatorView and UIProgressView.

StepProgressView Step-by-step progress view with labels and shapes. A good replacement for UIActivityIndicatorView and UIProgressView. Usage let progr

Yonat Sharon 340 Dec 16, 2022
Windless makes it easy to implement invisible layout loading view.

Windless Windless makes it easy to implement invisible layout loading view. Contents Requirements Installation Usage Looks Credits Communication Licen

ArLupin 940 Dec 22, 2022
Show pleasant loading view for your users 😍

RHPlaceholder ?? Because traditional loading view like UIActivityIndicatorView or similar one are no longer so trendy (Facebook or Instagram apps are

Robert Herdzik 238 Nov 2, 2022
ScanBarcodes is a SwiftUI view that scans barcodes using an iPhone or iPad camera.

ScanBarcodes ScanBarcodes is a SwiftUI view that scans barcodes using an iPhone or iPad camera. The framework uses AVFoundation for high performance v

NASA Jet Propulsion Laboratory 6 Nov 29, 2022
Will Powell 1.2k Dec 29, 2022
BioViewer - Protein (.pdb, .cif and .fasta) viewer for iPhone, iPad and Mac, using SwiftUI + SceneKit

BioViewer - Protein (.pdb, .cif and .fasta) viewer for iPhone, iPad and Mac, using SwiftUI + SceneKit

Raúl Montón 16 Dec 21, 2022
A "time ago", "time since", "relative date", or "fuzzy date" category for NSDate and iOS, Objective-C, Cocoa Touch, iPhone, iPad

Migration 2014.04.12 NSDate+TimeAgo has merged with DateTools. DateTools is the parent project and Matthew York is the project head. This project is n

Kevin Lawler 1.8k Dec 2, 2022
iOS/iPhone/iPad Chart, Graph. Event handling and animation supported.

#EChart A highly extendable, easy to use chart with event handling, animation supported. ##Test How To Use Download and run the EChartDemo project is

Scott Zhu 646 Dec 27, 2022
📱 Wire for iOS (iPhone and iPad)

Wire™ This repository is part of the source code of Wire. You can find more information at wire.com or by contacting [email protected]. You can find

Wire Swiss GmbH 3.2k Jan 8, 2023
A Swift mailing list client for iPhone and iPad

Due to costs and lack of interest, I’ve had to take down the Charter service. If you’re interested in running your own copy, get in touch and I can se

Matthew Palmer 526 Dec 24, 2022
TriangleDraw is a pixel editor for iPad and iPhone.

TriangleDraw TriangleDraw is brilliant for sketching logos. You can quickly create designs that can be used for branding on letterheads or on your web

TriangleDraw 46 Sep 26, 2022
Little Go. An iOS application that lets you play the game of Go on the iPhone or iPad.

Introduction Little Go is a free and open source iOS application that lets you play the game of Go on the iPhone or iPad. You can play against another

Patrick Näf 121 Nov 26, 2022
A Modern MUD Client for iPhone and iPad.

MUDRammer — A Modern MUD Client > invoke incantation of build status divination You move a hand through a series of quick gestures, your digits twin

Splinesoft 70 Aug 26, 2022
STPopup provides STPopupController, which works just like UINavigationController in popup style, for both iPhone and iPad. It's written in Objective-C and compatible with Swift.

STPopup STPopup provides STPopupController, which works just like UINavigationController in popup style, for both iPhone and iPad. It's written in Obj

Kevin Lin 2.6k Jan 6, 2023
A quick and simple way to authenticate an Instagram user in your iPhone or iPad app.

InstagramSimpleOAuth A quick and simple way to authenticate an Instagram user in your iPhone or iPad app. Adding InstagramSimpleOAuth to your project

Ryan Baumbach 90 Aug 20, 2022
A quick and simple way to authenticate a Dropbox user in your iPhone or iPad app.

DropboxSimpleOAuth A quick and simple way to authenticate a Dropbox user in your iPhone or iPad app. Adding DropboxSimpleOAuth to your project CocoaPo

Ryan Baumbach 42 Dec 29, 2021