Skip to content

z624821876/HZPhotoBrowser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HZPhotoBrowser

##tips 据几位同学反映,图片在显示和隐藏的时候动画会出现错位情况。现对这种情况做出说明,首先这种情况的存在主要是由于convertRect坐标转换不正确导致,一般是直接用UITableviewController布局才会导致转换不正确。建议使用UIViewController + UITableview的方式布局。

##简介 一个类似于新浪微博图片浏览器的框架。
A framework similar to the sina weibo photo browser.

  • 支持显示和隐藏动画。
    -- Support the show and hide animation effects
  • 支持双击缩放,手势放大缩小。
    -- Supports double-click scaling, gestures to zoom in.
  • 支持图片存储。
    -- Support photo storage.
  • 支持网络加载gif图片,长图滚动浏览。
    -- Support network loading GIF images, scroll through long figure.
  • 支持横竖屏显示。
    -- Support for landscape and vertical screen display switch.

##功能展示

1. 显示和退出图片浏览器的动画效果
![image](https://github.com/chennyhuang/GIFSource/blob/master/111.gif)
2. 双击放大缩小,手势捏合
(解决双击时图片跳跃问题,现在双击放大图片比较流畅)
![image](https://github.com/chennyhuang/GIFSource/blob/master/222.gif)
3. 显示gif图片
![image](https://github.com/chennyhuang/GIFSource/blob/master/333.gif)
4.长图滚动浏览
![iamge](https://github.com/chennyhuang/GIFSource/blob/master/444.gif)
5.放大至全屏无黑边
![image](https://github.com/chennyhuang/GIFSource/blob/master/555.gif)
6.支持横屏
![image](https://github.com/chennyhuang/GIFSource/blob/master/666.gif)

###创建图片浏览器

HZPhotoBrowser *browserVc = [[HZPhotoBrowser alloc] init];
browserVc.sourceImagesContainerView = 原图的父控件;
browserVc.imageCount = 图片总数;
browserVc.currentImageIndex = 当前图片index;
// 代理
browserVc.delegate = self;
// 展示图片浏览器
[browserVc show];

###实现代理

//临时占位图(thumbnail图)
- (UIImage *)photoBrowser:(HZPhotoBrowser *)browser placeholderImageForIndex:(NSInteger)index;
//高清原图 (bmiddle图)
- (NSURL *)photoBrowser:(HZPhotoBrowser *)browser highQualityImageURLForIndex:(NSInteger)index;

##提示

  • 本框架纯ARC。主要目的是为了大家学习使用。

About

图片浏览器 ,photoBrowser ,新浪微博,picture,pictureBrowser,sina,weibo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 100.0%