图片浏览器(删除图片、保存图片到本地)

自带工具条和导航条,单击显示和隐藏,可以实现在浏览时直接删除图片和保存图片到本地

图片浏览器.gif

该程序基于ImageViewer,将它的部分实现改写。

使用方法:

self.imageViewer = [[ImageViewer alloc] init];
self.imageViewer.pageControl = NO;
NSArray *images = [NSArray new];
images = @[@"http://img.jj20.com/up/allimg/911/121215132T8/151212132T8-1-lp.jpg",
           @"http://b.zol-img.com.cn/sjbizhi/images/6/208x312/1396940684766.jpg",
           @"http://b.zol-img.com.cn/sjbizhi/images/6/208x312/1394701139813.jpg",
           @"http://img.jj20.com/up/allimg/911/0P315132137/150P3132137-1-lp.jpg",
           @"http://b.zol-img.com.cn/sjbizhi/images/1/208x312/1350915106394.jpg",
           @"http://b.zol-img.com.cn/sjbizhi/images/8/208x312/1427966117121.jpg",
           @"http://img.jj20.com/up/allimg/811/052515103222/150525103222-1-lp.jpg",
           @"http://b.zol-img.com.cn/sjbizhi/images/8/208x312/1435742799400.jpg",
           @"http://imga1.pic21.com/bizhi/131016/02507/s11.jpg"];
self.imageViewer.imageArray = [images mutableCopy];
self.imageViewer.titleArray = [@[@"金乐佳", @"婚礼", @"金乐佳", @"婚礼", @"金乐佳", @"婚礼", @"金乐佳", @"婚礼", @"婚礼"] mutableCopy];
self.imageViewer.uploaderArray = [@[@"进了图", @"李四", @"进了图", @"李四", @"进了图", @"李四", @"进了图", @"李四", @"婚礼"] mutableCopy];
// 此处可以将代码里的数组里存放模型,模型里分别存放相应的数据,现在因为Demo所以分别传入的
self.imageViewer.index = index;
[self.imageViewer showView:self];

代码下载地址:https://github.com/jql772386689/JingQLPhotoBrowser

你可能感兴趣的:(图片浏览器(删除图片、保存图片到本地))