MWPhotoBrowser的简单使用
来源:互联网 发布:为知云笔记使用教程 编辑:程序博客网 时间:2024/06/09 20:14
MWPhotoBrowser的简单使用
最近做的项目有类似朋友圈动态的功能,其中需求点击图片可以浏览。然后就用了下MWPhotoBrowser这个第三方图片浏览器,感觉很不错。
MWPhotoBrowser 的github链接 https://github.com/mwaterfall/MWPhotoBrowser
1、 创建MWPhotoBrowser
要使用initWithDelegate方法,要遵循MWPhotoBrowserDelegate协议
//创建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]的gith地址看吧 https://github.com/mwaterfall/MWPhotoBrowser。不过纯英文,会有点儿压力。
下面有个复杂一些的应用的介绍文章:
MWPhotoBrowser框架的使用步骤
http://blog.csdn.net/u012592258/article/details/50836138
阅读全文
0 0
- MWPhotoBrowser的简单使用
- MWPhotoBrowser的简单使用
- MWPhotoBrowser的简单使用
- MWPhotoBrowser框架的使用步骤
- MWPhotoBrowser 使用
- MWPhotoBrowser的基本使用及图片尺寸的更改
- iOS之MWPhotoBrowser照片浏览器框架的原理与使用
- 对ScrollView和UITapGestureRecognizer 以及开源MWPhotoBrowser的简单练习
- MWPhotoBrowser 引起的 <Error>: CGAffineTransformInvert: singular matrix
- MWPhotoBrowser图片无法左右滚动切换的问题
- 不用MWPhotoBrowser,自定制图片浏览器+过场动画代码,超简单!get
- 解决MWPhotoBrowser中spinner不停的转不消失的问题
- 解决MWPhotoBrowser中的SDWebImage加载大图导致的内存警告问题
- 解决MWPhotoBrowser中的SDWebImage加载大图导致的内存警告问题
- 解决MWPhotoBrowser中的SDWebImage加载大图导致的内存警告问题
- 解决MWPhotoBrowser中的SDWebImage加载大图导致的内存警告问题
- 解决MWPhotoBrowser中的SDWebImage加载大图导致的内存警告问题(刚刚)
- 解决MWPhotoBrowser中的SDWebImage加载大图导致的内存警告问题解决方案参考
- Spring系列之Spring常用注解总结
- RTSP重要方法
- 点赞功能(ajax+jsp+servlet)
- poj 3650 The Seven Percent Solution
- UEditor控件图片无法正常缩放
- MWPhotoBrowser的简单使用
- jQuery ias插件使用
- B
- Java创建多线程
- 重回北京
- Sliding Shapes for 3D Object Detection in Depth Images
- poj 2080 Calendar
- 面试题-音量控制
- Shopping商店购物