添加文件

This commit is contained in:
wu736139669
2015-06-29 11:47:53 +08:00
parent b3531f3da8
commit 2f091961ce
2 changed files with 366 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
//
// UIImageViewReloading.h
// XiaoYu
// 可以显示进度,还可以失败重新下载
// Created by xmfish on 14-8-21.
// Copyright (c) 2014年 Benson. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "UIImageView+WebCache.h"
typedef NS_ENUM(NSInteger, LKImageViewStatus){
LKImageViewStatusNone = 0,
LKImageViewStatusLoaded = 1,
LKImageViewStatusLoading = 2,
LKImageViewStatusFail = 3
};
@interface UIImageView(Reloading)
//加载的图片 url地址 可以是 NSString 或 NSURL
@property(copy, nonatomic) id imageURL;
//这个不会设置 image 只会保存ImageURL
- (void)setImageURLFromCache:(id)imageURL;
//当前状态
@property LKImageViewStatus status;
//图片点击事件 不用再手动添加UITapGestureRecognizer
@property(copy, nonatomic) void(^onTouchTapBlock)(UIImageView *imageView);
//重新加载图片
- (void)reloadImageURL;
@end