DHImageProgressHud is a easy to use Hud built on the same foundation as SVProgressHUD. Instead of displaying the standard spinner, DHImageProgressHud enable developers to simply plug a set of animation frames and loop through that as the loading view.
- Sorry cocoapods not available yet. I'm still in the middle of getting things together.
- Drag the
DHImageProgressHud/DHImageProgressHud
folder into your project. - Add the QuartzCore framework to your project.
Example Use Case
[DHImageProgressHud show];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
// time-consuming task
dispatch_async(dispatch_get_main_queue(), ^{
[DHImageProgressHud dismiss];
});
});
In order to load your images into DHImageProgressHud :
All Image files must be named in sequential order and must be 4 digits (padded with 0's if necessary).
example :coffee_0000.png, this represents the first frame of our animation
+ (void)setAnimationImagePrefix:(NSString *)imagePrefix numOfFrames:(NSInteger)frames;
[DHImageProgressHud setAnimationImagePrefix:@"coffee" numOfFrames:3];
DHImageProgressHud was inspired by and built on top of Sam Vermette's SVProgressHUD