Files
UIImageView-Reload/UIImageView+Reloading.h
T
2015-06-29 11:47:53 +08:00

33 lines
904 B
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//
// 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