MWPhotoBrowser的简单使用
2017-04-10 10:10
253 查看
原文http://www.jianshu.com/p/210d70c5bcb9
github链接 https://github.com/mwaterfall/MWPhotoBrowser
github链接 https://github.com/mwaterfall/MWPhotoBrowser
1、 创建MWPhotoBrowser
//创建MWPhotoBrowser ,要使用initWithDelegate方法,要遵循MWPhotoBrowserDelegate协议 MWPhotoBrowser *browser = [[MWPhotoBrowser alloc] initWithDelegate:self]; //设置当前要显示的图片 [browser setCurrentPhotoIndex:indexPath.item]; //push到MWPhotoBrowser [self.navigationController pushViewController:browser animated:YES];
2、实现代理
//返回图片个数 - (NSUInteger)numberOfPhotosInPhotoBrowser:(MWPhotoBrowser *)photoBrowser{ return count; } //返回图片模型 - (id <MWPhoto>)photoBrowser:(MWPhotoBrowser *)photoBrowser photoAtIndex:(NSUInteger)index{ //创建图片模型 MWPhoto *photo = [MWPhoto photoWithURL:photoUrl]; return photo; }
相关文章推荐
- MWPhotoBrowser的简单使用
- MWPhotoBrowser的简单使用
- MWPhotoBrowser 使用
- 不用MWPhotoBrowser,自定制图片浏览器+过场动画代码,超简单!get
- MWPhotoBrowser的基本使用及图片尺寸的更改
- MWPhotoBrowser框架的使用步骤
- MWPhotoBrowser使用
- iOS--使用MWPhotoBrowser进行图片保存
- MJPhotoBrowser的简单使用
- iOS开发 - OC之MWPhotoBrowser框架的使用步骤
- iOS--使用MWPhotoBrowser进行图片保存滑动卡顿问题
- 解决MWPhotoBrowser中的SDWebImage加载大图导致的内存警告问题(刚刚)
- 解决MWPhotoBrowser中的SDWebImage加载大图导致的内存警告问题
- 解决MWPhotoBrowser中的SDWebImage加载大图导致的内存警告问题
- 导航栏切换遇上MWPhotoBrowser
- MWPhotoBrowser 引起的 <Error>: CGAffineTransformInvert: singular matrix
- SDPhotoBrowser 详细介绍 非常简单易用的图片浏览器,模仿微博图片有源码例子
- MWPhotoBrowser 属性详解 和代理解释
- 解决MWPhotoBrowser中的SDWebImage加载大图导致的内存警告问题
- MWPhotoBrowser, simple and elegant image library for iOS