照片多選、預(yù)覽缎除、代理回調(diào)
項(xiàng)目需要严就、自行封裝,特此分享器罐。
注意點(diǎn):對(duì)于一千張以上甚至更多的圖片待檢測(cè)顯示效果盈蛮。點(diǎn)擊所有圖片All Photos、圖片能否在collectionView上顯示技矮,待檢測(cè)抖誉。
效果圖如下:
photo.png
collection.jpg
single.jpg
how to use
1.導(dǎo)入頭文件
#import "ZCJImagesViewController.h"
#import "ZCJSelectImageViewController.h"
//2.遵守代理 ZCJSelectImageViewControllerDelegate
@interface ViewController ()<ZCJSelectImageViewControllerDelegate>
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
ZCJImagesViewController *imagesCtr = [[ZCJImagesViewController alloc] init];
imagesCtr.delegate = self;
UINavigationController *navigation = [[UINavigationControlleralloc]initWithRootViewController:imagesCtr];
[self presentViewController:navigation animated:YES completion:nil];
}
- (void)selectImageViewController:(id)picker didFinishPickingImageWithInfo:(NSArray<UIImage *> *)info
{
NSLog(@"%@",info);
}