GithubHelp home page GithubHelp logo

photocollectionview's Introduction

PhotoCollectionView

This view helps you display your photos and developed using swift. It's almost like the Photo app in iOS. You can zoom every single photo and display as many photos as you want. Yet I am still working on this project, but I have already relized the basic functions.

###Demo

Demo

###How to use Copy PhotoCollectionView.swift and ZoomablePhotoView.swift to your project.

You need three arguments to initialize this view.

  1. frame for this view
  2. an array contains all the photo you want to display in the view
  3. (optional)the number you want to display initially

Create an instance of PhotoCollectionView like this:

var image1 = UIImage(named: "pic1")
var image2 = UIImage(named: "pic2")
var image3 = UIImage(named: "pic3")
var image4 = UIImage(named: "pic4")
var image5 = UIImage(named: "pic5")
var photoArray = NSArray(array: [image1,image2,image3,image4,image5])
var myPhotoCollectionView = PhotoCollevtionView(outerFrame: self.view.frame, photoArray: array)
//or you can initialize it like this:
//var myPhotoCollectionView = PhotoCollevtionView(outerFrame: self.view.frame, photoArray: array, currentNumber: 3)

Then add this view to your view in which you want to display these photos.

photocollectionview's People

Contributors

windmemory avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

photocollectionview's Issues

Zoom on last photo

Very useful project and thanks for the quick updates.

There is an issue if the user zooms in on the last photo in the pageviewcontroller, they cannot swipe back.

Crash when Array == 2

When the number of images is 2, the collection view crashes on swipe.

Tested on the demo source (setting 2 images).

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.