Coder Social home page Coder Social logo

agphotobrowser's Introduction

AGPhotoBrowser

A photo browser for iOS6 and iOS7 inspired by Facebook iOS app.

Demo project included.

It currently supports:

  • Any number of images through a data source
  • Optional title and description (with support for long description through a 'See more' button)
  • Full screen view
  • Pinch to zoom in/out
  • Double tap to zoom in/out
  • Orientation changes
  • "Swipe up/down" to hide the photo browser
  • "Done/Action buttons" to dismiss the browser or perform a few operations on the selected image

1

Install

The suggested way to install the component is using CocoaPods, just include the following line in your Podfile to get the latest version: pod "AGPhotoBrowser"

Usage

There is a demo project included that shows how to use the photo browser.

  • import AGPhotoBrowserView.h in your class
  • create a new instance of AGPhotoBrowserView and set the delegate and the dataSource to your class
  • implement - (NSInteger)numberOfPhotosForPhotoBrowser:(AGPhotoBrowserView *)photoBrowser and - (UIImage *)photoBrowser:(AGPhotoBrowserView *)photoBrowser imageAtIndex:(NSInteger)index methods from the datasource
  • (optional) provide a title and a description for each image implementing - (NSString *)photoBrowser:(AGPhotoBrowserView *)photoBrowser titleForImageAtIndex:(NSInteger)index and - (NSString *)photoBrowser:(AGPhotoBrowserView *)photoBrowser descriptionForImageAtIndex:(NSInteger)index
  • show the browser calling the - (void)show or - (void)showFromIndex:(NSInteger)initialIndex methods
  • dismiss the photo browser with a completion block calling - (void)hideWithCompletion:( void (^) (BOOL finished) )completionBlock

TO-DO

  • add pinch to zoom gesture on images (from 1.0.4, thanks @dtsolis)
  • support orientation changes (from 1.0.6)

Resources

Info can be found on my website, and on Twitter.

Bitdeli Badge

agphotobrowser's People

Contributors

albertodebortoli avatar andreagiavatto avatar bitdeli-chef avatar dtsolis avatar netoxico avatar

Watchers

 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.