All Projects → lengningLN → LNPhotoBrowser

lengningLN / LNPhotoBrowser

Licence: MIT license
模仿微信朋友圈的图片浏览器

Programming Languages

objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to LNPhotoBrowser

Lkimagekit
A high-performance image framework, including a series of capabilities such as image views, image downloader, memory caches, disk caches, image decoders and image processors.
Stars: ✭ 2,063 (+10757.89%)
Mutual labels:  objcective-c
unity-objc-spam-generater
Unity导出的ios马甲包代码混淆
Stars: ✭ 34 (+78.95%)
Mutual labels:  objcective-c
ikyle.me-code-examples
Smaller code examples from my blog posts on ikyle.me
Stars: ✭ 29 (+52.63%)
Mutual labels:  objcective-c
iOS-Interview
📚 Comprehensive list of questions and problems to pass an interview for the iOS Developer position
Stars: ✭ 127 (+568.42%)
Mutual labels:  objcective-c
DoProject
一个完整项目从头开始需要的工具、技术、SDK等总结
Stars: ✭ 31 (+63.16%)
Mutual labels:  objcective-c
WebRTC
Unofficial distribution of up to date WebRTC framework binaries for iOS and macOS
Stars: ✭ 114 (+500%)
Mutual labels:  objcective-c

LNPhotoBrowser

一套友好的、方便集成的针对图片浏览框架! 实现一个类似微信朋友圈中图片浏览的框架。

本次优化

  1. 添加底部图片页数指示
  2. 图片之间添加间隔
  3. 添加下滑关闭
  4. 添加拖动变小,背景变化

Interduce 【简单介绍】

  • 友好不影响原有项目结构
  • 支持微信朋友圈图片浏览时的所有操作

Features【能做什么】

  • 点击实现图片放大,并加载所有需要显示的图片
  • 支持缩放
  • 支持左滑、右滑浏览大图
  • 支持拖拽
  • 支持下滑到一定位置缩小并回到原图
  • 支持背景渐变
  • 支持旋转

目前存在的问题

  1. 不支持缩放
  2. 极端情况细节的处理不够完美

Class【使用到的类】

  1. LNPhotoBrowser
  2. LNPhotoCell
  3. LNLoadingView

Getting Started【开始使用】

效果演示

文字介绍

  • 把LNPhotoBrowser类拖进工程中,注意依赖框架
  • 继承,根据具体的需求,在大图浏览时加入响应的功能
  • 在图片点击的地方,创建LNPhotoBrowser对象,赋值相应的属性即可
  • 接受
  • 根据需要实现对应的协议方法

代码介绍

  • 再点击图片的位置的设置
LNPhotoBrowser *browser = [[LNPhotoBrowser alloc] init];
    browser.delegate = self;
    browser.cellClass = [LNPhotoCell class];
    browser.selectedIndex = indexPath.row;
    [browser showWithViewController:self];
}
  • 需要实现的数据协议

 /**
 图片的个数
 */
- (NSInteger)numberOfPhotosInPhotoBrowser:(LNPhotoBrowser *)photoBrowser;

/**
 图片的URL
 支持本地和远程两种URL
 */
- (NSURL *)photoBrowser:(LNPhotoBrowser *)photoBrowser imageURLForIndex:(NSInteger)index;

/**
 设置占位图片
 @discussion 必须设置,不然在视图没加载出来之前无法显示
 */
- (UIImage *)photoBrowser:(LNPhotoBrowser *)photoBrowser placeholderImageForIndex:(NSInteger)index;

/**
 如果需要缩放弹出 需要提供原来的view视图
 */
- (UIImageView *)photoBrowser:(LNPhotoBrowser *)photoBrowser sourceViewForIndex:(NSInteger)index;

more about 【更多】

  1. 如果有什么问题,请在issues区域提问,我会抽时间改进。
  2. 我的博客
  3. 我的微博
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].