iOS開發(fā)常用的第三方類庫
2
3
4
5
6
7
8
9
10
11
12
13
[SDWebImageDownloader.sharedDownloader downloadImageWithURL:imageURL
options:0
progress:^(NSUInteger receivedSize,long long expectedSize)
{
// 進度
}
completed:^(UIImage *image, NSData *data, NSError *error,BOOL finished)
{
if (image finished)
{
// 下載完成
}
}];
UIActivityIndicator-for-SDWebImage 為SDWebImage顯示加載效果
本文引用地址:http://2s4d.com/article/201610/305920.htmGitHub:https://github.com/JJSaccolo/UIActivityIndicator-for-SDWebImage
用于為SDWebImage在UIImageView加載圖片時,顯示加載效果(UIActivityIndicatorView實現(xiàn)),它提供以下方法:
1 2 3 4 5 6 7 | - (void)setImageWithURL:(NSURL *)url usingActivityIndicatorStyle:(UIActivityIndicatorViewStyle)activityStyle; - (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder usingActivityIndicatorStyle:(UIActivityIndicatorViewStyle)activityStyle; - (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options usingActivityIndicatorStyle:(UIActivityIndicatorViewStyle)activityStyle; - (void)setImageWithURL:(NSURL *)url completed:(SDWebImageCompletedBlock)completedBlock usingActivityIndicatorStyle:(UIActivityIndicatorViewStyle)activityStyle; - (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock usingActivityIndicatorStyle:(UIActivityIndicatorViewStyle)activityStyle;
相關(guān)推薦
技術(shù)專區(qū) |
評論