iOS開(kāi)發(fā)常用的第三方類(lèi)庫(kù)
2
3
4
5
6
7
8
9
10
11
12
13
[SDWebImageDownloader.sharedDownloader downloadImageWithURL:imageURL
options:0
progress:^(NSUInteger receivedSize,long long expectedSize)
{
// 進(jìn)度
}
completed:^(UIImage *image, NSData *data, NSError *error,BOOL finished)
{
if (image finished)
{
// 下載完成
}
}];
UIActivityIndicator-for-SDWebImage 為SDWebImage顯示加載效果
本文引用地址:http://cafeforensic.com/article/201610/305920.htmGitHub:https://github.com/JJSaccolo/UIActivityIndicator-for-SDWebImage
用于為SDWebImage在UIImageView加載圖片時(shí),顯示加載效果(UIActivityIndicatorView實(shí)現(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ù)專(zhuān)區(qū)
|
評(píng)論