1
/*
2
 * This file is part of the SDWebImage package.
3
 * (c) Olivier Poitrey <rs@dailymotion.com>
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8

9
#import "MKAnnotationView+WebCache.h"
10

11
#if SD_UIKIT || SD_MAC
12

13
@implementation MKAnnotationView (WebCache)
14

15 0
- (void)sd_setImageWithURL:(nullable NSURL *)url {
16 0
    [self sd_setImageWithURL:url placeholderImage:nil options:0 completed:nil];
17
}
18

19 0
- (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder {
20 0
    [self sd_setImageWithURL:url placeholderImage:placeholder options:0 completed:nil];
21
}
22

23 0
- (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options {
24 0
    [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:nil];
25
}
26

27 0
- (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options context:(nullable SDWebImageContext *)context {
28 0
    [self sd_setImageWithURL:url placeholderImage:placeholder options:options context:context progress:nil completed:nil];
29
}
30

31 2
- (void)sd_setImageWithURL:(nullable NSURL *)url completed:(nullable SDExternalCompletionBlock)completedBlock {
32 2
    [self sd_setImageWithURL:url placeholderImage:nil options:0 completed:completedBlock];
33
}
34

35 0
- (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder completed:(nullable SDExternalCompletionBlock)completedBlock {
36 0
    [self sd_setImageWithURL:url placeholderImage:placeholder options:0 completed:completedBlock];
37
}
38

39 2
- (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options completed:(nullable SDExternalCompletionBlock)completedBlock {
40 2
    [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:completedBlock];
41
}
42

43 2
- (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options progress:(nullable SDImageLoaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock {
44 2
    [self sd_setImageWithURL:url placeholderImage:placeholder options:options context:nil progress:progressBlock completed:completedBlock];
45
}
46

47
- (void)sd_setImageWithURL:(nullable NSURL *)url
48
          placeholderImage:(nullable UIImage *)placeholder
49
                   options:(SDWebImageOptions)options
50
                   context:(nullable SDWebImageContext *)context
51
                  progress:(nullable SDImageLoaderProgressBlock)progressBlock
52 2
                 completed:(nullable SDExternalCompletionBlock)completedBlock {
53 2
    __weak typeof(self) wself = self;
54 2
    [self sd_internalSetImageWithURL:url
55 2
                    placeholderImage:placeholder
56 2
                             options:options
57 2
                             context:context
58 2
                       setImageBlock:^(UIImage * _Nullable image, NSData * _Nullable imageData, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
59 2
                           wself.image = image;
60
                       }
61 2
                            progress:progressBlock
62 2
                           completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) {
63 2
                               if (completedBlock) {
64 2
                                   completedBlock(image, error, cacheType, imageURL);
65
                               }
66 2
                           }];
67
}
68

69
@end
70

71
#endif

Read our documentation on viewing source code .

Loading