Skip to content

Allogy/DAProgressOverlayView

 
 

Repository files navigation

DAProgressOverlayView

A UIView subclass displaying download progress. Looks similarly to springboard icons of apps being downloaded in iOS 7.

Animated example

Installing

You can install the library with Cocoapods

platform :ios, '5.0'
pod "DAProgressOverlayLayeredView"

Usage

  1. Create overlay view with your view bounds, and add it:
self.progressOverlayView = [[DAProgressOverlayView alloc] initWithFrame:self.imageView.bounds]; //Create new view
[self.imageView addSubview:self.progressOverlayView]; //Add as subview
[self.progressOverlayView displayOperationWillTriggerAnimation]; //Play start animation
  1. Update overlay progress level:
self.progressOverlayView.progress = progress;
  1. Catch animation finish:
__weak DAViewController *wself = self;
[self.progressOverlayView setAnimationCompletionHandler:^(DAProgressOverlayAnimationType type) {
    if (type == DAProgressOverlayAnimationFinish) {
        wself.progressOverlayView = nil;
    }
}];

About

Layer-based version with CABasicAnimation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 96.1%
  • Ruby 3.9%