LFProgressHUD is an iOS class that displays a full screen HUD with custom indicator and/or labels. LFProgressHUD can also display dynamic progress in any thread.
LFProgressHUD works on iOS 8.0+ and requires ARC to build. It depends on the following Apple frameworks, which should already be included with most Xcode templates:
- Foundation.framework
- UIKit.framework
- CoreGraphics.framework
- QuartzCore.framework
You will need the latest developer tools in order to build LFProgressHUD. Old Xcode versions might work, but compatibility will not be explicitly maintained.
CocoaPods is the recommended way to add LFProgressHUD to your project.
- Add a pod entry for LFProgressHUD to your Podfile
pod 'LFProgressHUD', '~> 0.1.1' - Install the pod(s) by running
pod install. - Include LFProgressHUD wherever you need it with
#import <LFProgressHUD/LFProgressHUD.h>.
Alternatively you can directly add the LFProgressHUD.h and LFProgressHUD.m source files to your project.
- Download the latest code version or add the repository as a git submodule to your git-tracked project.
- Open your project in Xcode, then drag and drop
LFProgressHUD.handLFProgressHUD.monto your project (use the "Product Navigator view"). Make sure to select Copy items when asked if you extracted the code archive outside of your project. - Include LFProgressHUD wherever you need it with
#import "LFProgressHUD.h".
Custom Progress Image.
LFProgressHUD can help you dealing with program which is running time-consuming operation such as API call back and disk writing. Public methods of LFProgressHUD are running in the main thead so that you can use it in some asynchronous tasks.
You can simply add an custom-appear-time notice.
[LFProgressHUD showHUDWithType:LFProgressHUDTypeDone duration:0.8 contentString:@"Done"];Or custom your own notice image.
[LFProgressHUD showHUDWithImage:[UIImage imageNamed:@"yao_ming"] duration:0.8 contentString:@"U ask me?"];You can add an Progress with 2 types, infinity roll animation and roll with live progress.
[LFProgressHUD showProgressWithType:LFProgressTypeRollInfinity progressImage:nil];
[LFProgressHUD showProgressWithType:LFProgressTypeRollProgress progressImage:nil];If you are using LFProgressTypeRollProgress, you can update progress as follow
[LFProgressHUD updateProgress:0.6];And to dissmiss
[LFProgressHUD dissmiss];See more in demo and welcome to post issues.
Enjoy.
This code is distributed under the terms and conditions of the MIT license.

