Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions DAProgressOverlayView/DAProgressOverlayView.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
@property (assign, nonatomic) CGFloat progress;

/**
The duration for animations displayed after calling `displayOperationWillTriggerAnimation` and `displayOperationDidFinishAnimation` methods.
The duration for animations displayed after calling `show:animated:` and `displayOperationDidFinishAnimation` methods.
This is 0.25 by default.
*/
@property (assign, nonatomic) CGFloat stateChangeAnimationDuration;
Expand All @@ -45,14 +45,28 @@
*/
@property (assign, nonatomic) BOOL triggersDownloadDidFinishAnimationAutomatically;

@property(nonatomic) BOOL isShowing;

/**
makes the outer faded out circle radius expand until it circumscribes the DAProgressOverlayView bounds
*/
- (void)displayOperationDidFinishAnimation;
If you only update progress in chunks, use this method instead of the `progress` property to get a smooth animation.
*/
- (void)setProgress:(CGFloat)targetProgress animated:(BOOL)animated;

/**
Changes radiuses of the inner and outer circles from zero to the corresponding values, calculated from 'innerRadiusRatio' and 'outerRadiusRatio' properties.
*/
- (void)displayOperationWillTriggerAnimation;
When showing, changes radiuses of the inner and outer circles from zero to the corresponding values,
calculated from 'innerRadiusRatio' and 'outerRadiusRatio' properties.

When hiding, makes the outer faded out circle radius expand until it circumscribes the DAProgressOverlayView bounds
*/
typedef void (^DAAnimationCompletionBlock)();
- (void)show:(BOOL)show animated:(BOOL)animated;
- (void)show:(BOOL)show animated:(BOOL)animated withCompletionBlock:(DAAnimationCompletionBlock)block;

/**
Assignable drawing block for showing an icon in the overlay view's center.
*/
typedef void (^DADrawingBlock)(CGContextRef ctx, CGRect rect, CGColorRef fillColor);
@property(nonatomic, copy) DADrawingBlock iconDrawingBlock;
@property(nonatomic) BOOL drawIcon;

@end
Loading