12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- //
- // HUPhotoBrowser.h
- // HUPhotoBrowser
- //
- // Created by mac on 16/2/24.
- // Copyright (c) 2016年 hujewelz. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- typedef void(^ __nullable DismissBlock)(UIImage * __nullable image, NSInteger index);
- typedef NS_ENUM(NSInteger, HUPhotoBrowserType) {
- NormalType,
- SpecialType,
- Type333333,//只有删除
- Type44444
- };
- @protocol HUPhotoBrowserDelegate <NSObject>
- - (void)setImageForSelfAvatar:(UIImage *)image;
- - (void)didDeletePhotoInIndex:(NSInteger)index;//已经删除了下标为多少的图片
- - (void)SetToTheHomePageImage:(NSInteger)index;//设置为首页形象照
- @end
- @interface HUPhotoBrowser : UIView
- @property (nonatomic,weak)id <HUPhotoBrowserDelegate>delegate;
- @property (nonatomic,assign)HUPhotoBrowserType type;
- /*
- * @param imageView 点击的imageView
- * @param URLStrings 加载的网络图片的urlString
- * @param index 点击的图片在所有要展示图片中的位置
- */
- + (nonnull instancetype)showFromImageView:(nullable UIImageView *)imageView withURLStrings:(nullable NSArray *)URLStrings atIndex:(NSInteger)index;
- + (nonnull instancetype)showFromImageView:(nullable UIImageView *)imageView withURLStrings:(nullable NSArray *)URLStrings placeholderUrlStrings:(nullable NSArray *)holderURLStrings atIndex:(NSInteger)index;
- /*
- * @param imageView 点击的imageView
- * @param withImages 加载的本地图片
- * @param index 点击的图片在所有要展示图片中的位置
- */
- + (nonnull instancetype)showFromImageView:(nullable UIImageView *)imageView withImages:(nullable NSArray *)images atIndex:(NSInteger)index;
- /*
- * @param imageView 点击的imageView
- * @param URLStrings 加载的网络图片的urlString
- * @param image 占位图片
- * @param index 点击的图片在所有要展示图片中的位置
- * @param dismiss photoBrowser消失的回调
- */
- + (nonnull instancetype)showFromImageView:(nullable UIImageView *)imageView withURLStrings:(nullable NSArray *)URLStrings placeholderImage:(nullable UIImage *)image atIndex:(NSInteger)index dismiss:(DismissBlock)block;
- /*
- * @param imageView 点击的imageView
- * @param withImages 加载的本地图片
- * @param image 占位图片
- * @param index 点击的图片在所有要展示图片中的位置
- * @param dismiss photoBrowser消失的回调
- */
- + (nonnull instancetype)showFromImageView:(nullable UIImageView *)imageView withImages:(nullable NSArray *)images atIndex:(NSInteger)index dismiss:(DismissBlock)block;
- + (nonnull instancetype)Type444showFromImageView:(nullable UIImageView *)imageView withImages:(nullable NSArray *)images atIndex:(NSInteger)index;
- + (nonnull instancetype)Type444showFromImageView:(nullable UIImageView *)imageView withImages:(nullable NSArray *)images atIndex:(NSInteger)index dismiss:(DismissBlock)block;
- @property (nonatomic, strong, nullable) UIImage *placeholderImage;
- @property (nonatomic,strong) NSArray* placeHolderUrlStrings;
- @end
|