XLImageViewer 仿照今日头条的图片浏览工具

仿照今日头条的图片浏览功能,实现的轻量级图片浏览工具。

功能:


缩放图片
加载网络图片
捏合、双击
下滑隐藏
保存至相册



说明:

加载网络图片的功能时利用SDWebImage实现的,所以在使用XLImageViewer时需要在项目里添加SDWebImage。

图片切换时利用UICollectionView实现的;图片的缩放是利用ScrollView的缩放原理实现的。

使用:

查看网络图片:

[[XLImageViewer shareInstanse] showNetImages:[self imageUrls] index:indexPath.row fromImageContainer:[collectionView cellForItemAtIndexPath:indexPath]];


查看本地图片:

[[XLImageViewer shareInstanse] showLocalImages:[self imagePathes] index:indexPath.row fromImageContainer:[collectionView cellForItemAtIndexPath:indexPath]];


demo下载

你可能感兴趣的:(XLImageViewer 仿照今日头条的图片浏览工具)