| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- //
- // ZLPhotoPickerBrowserViewController.h
- // ZLAssetsPickerDemo
- //
- //
- #import <UIKit/UIKit.h>
- #import "DKPhotoPickerBrowserPhoto.h"
- #import "DKPhotoPickerCommon.h"
- #import "DKPhotoPickerCustomToolBarView.h"
- @class DKPhotoPickerBrowserViewController;
- @protocol DKPhotoPickerBrowserViewControllerDataSource <NSObject>
- @optional
- /**
- * 有多少组
- */
- - (NSInteger) numberOfSectionInPhotosInPickerBrowser:(DKPhotoPickerBrowserViewController *) pickerBrowser;
- @required
- /**
- * 每个组多少个图片
- */
- - (NSInteger) photoBrowser:(DKPhotoPickerBrowserViewController *)photoBrowser numberOfItemsInSection:(NSUInteger)section;
- /**
- * 每个对应的IndexPath展示什么内容
- */
- - (DKPhotoPickerBrowserPhoto *)photoBrowser:(DKPhotoPickerBrowserViewController *)pickerBrowser photoAtIndexPath:(NSIndexPath *)indexPath;
- @end
- @protocol DKPhotoPickerBrowserViewControllerDelegate <NSObject>
- @optional
- /**
- * 点击每个Item时候调用
- */
- - (void)photoBrowser:(DKPhotoPickerBrowserViewController *)pickerBrowser photoDidSelectView:(UIView *)scrollBoxView atIndexPath:(NSIndexPath *)indexPath;
- /**
- * 返回用户自定义的toolBarView(类似tableView FooterView)
- *
- * @return 返回用户自定义的toolBarView
- */
- - (DKPhotoPickerCustomToolBarView *)photoBrowserShowToolBarViewWithphotoBrowser:(DKPhotoPickerBrowserViewController *)photoBrowser;
- /**
- * 准备删除那个图片
- *
- * @param index 要删除的索引值
- */
- - (BOOL)photoBrowser:(DKPhotoPickerBrowserViewController *)photoBrowser willRemovePhotoAtIndexPath:(NSIndexPath *)indexPath;
- /**
- * 删除indexPath对应索引的图片
- *
- * @param indexPath 要删除的索引值
- */
- - (void)photoBrowser:(DKPhotoPickerBrowserViewController *)photoBrowser removePhotoAtIndexPath:(NSIndexPath *)indexPath;
- /**
- * 滑动结束的页数
- *
- * @param page 滑动的页数
- */
- - (void)photoBrowser:(DKPhotoPickerBrowserViewController *)photoBrowser didCurrentPage:(NSUInteger)page;
- /**
- * 滑动开始的页数
- *
- * @param page 滑动的页数
- */
- - (void)photoBrowser:(DKPhotoPickerBrowserViewController *)photoBrowser willCurrentPage:(NSUInteger)page;
- @end
- @interface DKPhotoPickerBrowserViewController : UIViewController
- // @require
- // 数据源/代理
- @property (nonatomic , weak) id<DKPhotoPickerBrowserViewControllerDataSource> dataSource;
- @property (nonatomic , weak) id<DKPhotoPickerBrowserViewControllerDelegate> delegate;
- // 点击的View
- @property (nonatomic , strong) UIView *toView;
- // 当前提供的组
- @property (strong,nonatomic) NSIndexPath *currentIndexPath;
- // @optional
- // 是否可以编辑(删除照片)
- @property (nonatomic , assign,getter=isEditing) BOOL editing;
- // 动画status (放大缩小/淡入淡出/旋转)
- @property (assign,nonatomic) UIViewAnimationAnimationStatus status;
- // 长按保存图片会调用sheet
- @property (strong,nonatomic) UIActionSheet *sheet;
- // 放大缩小一张图片的情况下(查看头像)
- - (void)showHeadPortrait:(UIImageView *)toImageView;
- // 放大缩小一张图片的情况下(查看头像)/ 缩略图是toImageView.image 原图URL
- - (void)showHeadPortrait:(UIImageView *)toImageView originUrl:(NSString *)originUrl;
- // 导航高度
- @property (assign,nonatomic) CGFloat navigationHeight;
- // @function
- // 展示控制器
- - (void)show;
- // 刷新数据
- - (void)reloadData;
- @end
|