Code Monkey home page Code Monkey logo

lpphotoviewer's Introduction

LPPhotoViewer

a simple photo browser

Installation

  • use cocoapods
pod 'LPPhotoViewer', '~> 0.0.6'
  • manual import
just download lib folder and add into your project

Usage

  • initialize imgae url array or UIImage objs
    self.urlArrays  = [[NSMutableArray alloc] init];
    self.imgArrays  = [[NSMutableArray alloc] init];
    [self.urlArrays addObject:@"https://drscdn.500px.org/photo/42393810/q=80_m=2000/fed5ccbf106c289f62e5762df92f1438"];
    [self.urlArrays addObject:@"https://drscdn.500px.org/photo/146441995/q=80_m=2000/0a6e687c0750ea05abf709bbd8c3d7f8"];
    [self.urlArrays addObject:@"https://drscdn.500px.org/photo/146512755/q=80_m=2000_k=1/62c584ed280fb11bbdb7d1c5451b6676"];
    [self.urlArrays addObject:@"https://drscdn.500px.org/photo/146409463/q=80_m=2000/9658bd373b7f84799dda05253d404a5d"];
    
    [self.imgArrays addObject:[UIImage imageNamed:@"carousel01"]];
    [self.imgArrays addObject:[UIImage imageNamed:@"carousel02"]];
    [self.imgArrays addObject:[UIImage imageNamed:@"carousel03"]];
  • set properties for LPPhotoViewer
LPPhotoViewer *pvc = [[LPPhotoViewer alloc] init];
// 1. for image urls
pvc.imgArr = self.urlArrays;

// 2. for UIImage objs
pvc.imgArr = self.imgArrays;

/** for custom properties */
// 1. show from specify index
pvc.currentIndex = 2;

// 2. indicatorType: IndicatorTypeNumLabel or IndicatorTypePageControl or none
pvc.indicatorType = IndicatorTypeNumLabel;
  • present LPPhotoViewer
[self presentViewController:pvc animated:YES completion:nil];

Screenshot

Notice

LPPhotoViewer will upgrade to 1.x & Swift3 which will be much better performance soon

Release notes

ver. 0.0.6

add fade in transition effect & fade out drag effect

ver. 0.0.5

new progress view & drag bugfix

ver. 0.0.4

add vertical drag gesture for dismiss

ver. 0.0.3

add zoom reset fix

ver. 0.0.2

add pageControl indicate type

ver. 0.0.1

first commit

lpphotoviewer's People

Contributors

litt1e-p avatar

Stargazers

MohsinAli avatar

Watchers

MohsinAli avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.