Latest 1.0.1
Homepage https://github.com/guowilling/SRPictureBrowser
License MIT
Platforms ios 7.0, requires ARC
Dependencies SDWebImage
Authors

Features

  • Similar to the Pengyouquan’s picture browser, Loading image with animation, blurring the current view background.
  • Long press the image to show action sheet, save image etc, you can extend it.
  • Currently, the download image depends on SDWebImage, I will rewrite the download and cache image function, do not rely on third-party libraries some time.

  • 类似于朋友圈的图片浏览器, 图片加载动画, 模糊当前视图背景.
  • 长按弹出选择器, 保存图片等, 你可以自行扩展它的功能.
  • 目前图片下载缓存使用 SDWebImage, 以后再不依赖于第三方库, 重写下载缓存图片的功能.

Show pictures

image

Installation

CocoaPods

Add pod ‘SRPictureBrowser’ to the Podfile, then run pod install in the terminal.

Manual

Drag the SRPictureBrowser folder to the project.(Note: if the project has already import SDWebImage, you should remove it which in the SRPictureBrowser folder)

Usage

UIImageView *tapedImageView = (UIImageView *)tapGestureRecognizer.view;
NSMutableArray *imageBrowserModels = [[NSMutableArray alloc] init];
for (NSInteger i = 0; i < 9; i ++) {
    SRPictureModel *imageBrowserModel = [SRPictureModel sr_pictureModelWithPicURLString:self.picURLStrings[i]
                                                                          containerView:tapedImageView.superview
                                                                    positionInContainer:[self.imageViewFrames[i] CGRectValue]
                                                                                  index:i];
    [imageBrowserModels addObject:imageBrowserModel];
}
SRPictureBrowser *pictureBrowser = [SRPictureBrowser sr_pictureBrowserWithModels:imageBrowserModels currentIndex:tapedImageView.tag];
[pictureBrowser show];

See the demo for more information.

If you have any question, submit an issue or contact me.
If this repo helps you, please give it a star, thanks a lot.
Have Fun.

Latest podspec

{
    "name": "SRPictureBrowser",
    "version": "1.0.1",
    "summary": "A concise and elegant easy-to-use picture browser, the code is clear and easy to extend.(u56feu7247u6d4fu89c8u5668)",
    "description": "Similar to the Pengyouquan's picture browser, Loading image with animation, blurring the current view background; Long press the image to show action sheet, save image etc, you can extend it; Currently, the download image depends on SDWebImage, I will rewrite the download and cache image function, do not rely on third-party libraries some time.",
    "homepage": "https://github.com/guowilling/SRPictureBrowser",
    "license": "MIT",
    "authors": {
        "guowilling": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/guowilling/SRPictureBrowser.git",
        "tag": "1.0.1"
    },
    "source_files": "SRPictureBrowser/*.{h,m}",
    "requires_arc": true,
    "dependencies": {
        "SDWebImage": [
            "~> 4.0.0"
        ]
    }
}

Pin It on Pinterest

Share This