-
Notifications
You must be signed in to change notification settings - Fork 18
/
WebPImageView.h
63 lines (50 loc) · 1.37 KB
/
WebPImageView.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//
// WebPImageView.h
// ImageButter
//
// Created by Dalton Cherry on 8/27/15.
//
#import <UIKit/UIKit.h>
#import "WebPImage.h"
#import "WebPImageLoadingProtocol.h"
@interface WebPImageView : UIView
typedef void (^WebPAnimationFinished)(NSInteger);
typedef void (^WebPImageFinished)(WebPImage*);
typedef void (^WebPImageProgress)(CGFloat);
/**
Set the image to display.
*/
@property(nonatomic)WebPImage *image;
/**
fetch the image from disk or remotely.
*/
@property(nonatomic)NSURL *url;
/**
expose the progress and finished blocks for image setting from URL
*/
- (void)setUrl:(NSURL*)url progress:(WebPImageProgress)progress finished:(WebPImageFinished)finished;
/**
Show a loading view will the image gets fetched.
*/
@property(nonatomic)UIView<WebPImageViewProgressDelegate> *loadingView;
/**
inset the loading view in the view.
*/
@property(nonatomic)UIEdgeInsets loadingInset;
/**
how many times should animation images repeat? Default is 0 which means keep looping forever.
*/
@property(nonatomic)NSInteger loopCount;
/**
Set to true to pause the animation.
*/
@property(nonatomic)BOOL pause;
/**
notifies when an animation has finished a loop.
*/
@property(nonatomic, strong)WebPAnimationFinished didFinishAnimation;
/**
returns the current aspect scaling that is being applied to the image (1 means none)
*/
@property(nonatomic, readonly)CGFloat aspect;
@end