Full aspect ratio grid layout for iOS

Overview

Greedo Layout for iOS

Version License Platform

A library that computes what size the UICollectionView cells should be to display images in a variable height fixed aspect ratio grid.

image

Getting Started

Installation with CocoaPods

CocoaPods is a 3rd-party dependency manager for Swift and Objective-C projects. For more information, refer to the CocoaPods Getting Started Guide. Otherwise, you can install CocoaPods with the following command:

$ gem install cocoapods
Podfile

To integrate GreedoLayout into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
pod 'GreedoLayout'

Then, run the following command:

$ pod install

License

GreedoLayout is released under the MIT license. See LICENSE for details.

Comments
  • Cannot install Pods for example project

    Cannot install Pods for example project

    Hi, I was going to run the example project, but when tried to install pods, it complains about my permission to your repo:

    [!] Error installing GreedoLayout [!] /usr/bin/git clone [email protected]:500px/greedo-layout-for-ios.git /var/folders/hv/zpcskz697xlfv17ktr6vtmjh0000gp/T/d20160227-1232-zb0mvp --single-branch --depth 1

    Cloning into '/var/folders/hv/zpcskz697xlfv17ktr6vtmjh0000gp/T/d20160227-1232-zb0mvp'... Permission denied (publicly). fatal: Could not read from remote repository.

    Please make sure you have the correct access rights and the repository exists.

    opened by mohpor 4
  • Add support for fixed height (with minimal cropping)

    Add support for fixed height (with minimal cropping)

    For layouts where you need fixed height rows with still a overall full aspect ratio feel, use the fixedHeight property. If set to YES, the rowMaximumHeight will be used for all rows, and the images will fit with some cropping applied.

    opened by whereisdave 1
  • Fixes a calculation bug for Flexible Height

    Fixes a calculation bug for Flexible Height

    GreedoSizeCalculator didn't consider interItemSpacing when calculates rowHeight under !fixedHeight this commit solves it.

    I looked through your code, turned out the logic was there, but somehow it got removed during rewrite. not sure if it's intended but this commit solved my problem (calculated cell sizes don't not share the same ratio with original sizes).

    opened by zaully 0
  • no cell spacing at last row

    no cell spacing at last row

    Hello, i use method computeSizesAtIndexPath() to calculate the size at sizeForItemAtindexPath, everything is fine but at last row there is now spacing between the cells. I am doing this on variable Height screen shot 2017-01-06 at 11 38 24 am

    opened by bikram109 0
  • Large collection

    Large collection

    Hello,

    Have you tried this on a large collection, let say 15k images? sizeForItemAtIndexPath being called for each image before even scrolling is a blocker.

    Any work-around? Cheers

    question 
    opened by fishandphil 0
Owner
500px
Stuff we built, and stuff we use
500px
LoremPicsum - Simple UIKit based app for displaying grid of pictures

LoremPicsum - Simple UIKit based app for displaying grid of pictures

Paweł Dziennik 0 Jan 20, 2022
📱iOS app to extract full-resolution video frames as images.

Frame Grabber is a focused, easy-to-use iOS app to extract full-resolution video frames as images. Perfect to capture and share your favorite video mo

Arthur Hammer 319 Jan 7, 2023
A simple Image full screen pop up

CLImageViewPopup Description A simple UIImageView for easy fullscreen image pop up. No matter where your UIImageView may be. Image pops up from where

Vineeth Vijayan 36 Apr 29, 2021
Swift image slideshow with circular scrolling, timer and full screen viewer

?? ImageSlideshow Customizable Swift image slideshow with circular scrolling, timer and full screen viewer ?? Example To run the example project, clon

Petr Zvoníček 1.7k Dec 21, 2022
A simple Image full screen pop up

CLImageViewPopup Description A simple UIImageView for easy fullscreen image pop up. No matter where your UIImageView may be. Image pops up from where

Vineeth Vijayan 36 Apr 29, 2021
A simple and flexible way to add source of overlapping circular pictures, currently supports horizontal overlapping or distant pictures with great layout flexibility.

THIS PROJECT IS NO LONGER MAINTAINED. STILL ONE ONLY BEST UI SOLUTION FOR UIKIT DEVELOPERS. SOON WILL COME UP WITH SWIFTUI STILL CONTRIBUTORS ARE WELC

Kiran Jasvanee 673 Dec 19, 2022
Agrume - 🍋 An iOS image viewer written in Swift with support for multiple images.

Agrume An iOS image viewer written in Swift with support for multiple images. Requirements Swift 5.0 iOS 9.0+ Xcode 10.2+ Installation Use Swift Packa

Jan Gorman 601 Dec 26, 2022
APNGKit is a high performance framework for loading and displaying APNG images in iOS and macOS.

APNGKit is a high performance framework for loading and displaying APNG images in iOS and macOS. It's built on top of a modified version of libpng wit

Wei Wang 2.1k Dec 30, 2022
An iOS/tvOS photo gallery viewer, useful for viewing a large (or small!) number of photos.

This project is unmaintained. Alex passed away in an accident in late 2019. His love of iOS development will always be remembered. AXPhotoViewer AXPho

Alex Hill 596 Dec 30, 2022
A lightweight generic cache for iOS written in Swift with extra love for images.

Haneke is a lightweight generic cache for iOS and tvOS written in Swift 4. It's designed to be super-simple to use. Here's how you would initalize a J

Haneke 5.2k Dec 11, 2022
✂️ Detect and crop faces, barcodes and texts in image with iOS 11 Vision api.

ImageDetect ImageDetect is a library developed on Swift. With ImageDetect you can easily detect and crop faces, texts or barcodes in your image with i

Arthur Sahakyan 299 Dec 17, 2022
A lightweight and fast image loader for iOS written in Swift.

ImageLoader ImageLoader is an instrument for asynchronous image loading written in Swift. It is a lightweight and fast image loader for iOS. Features

Hirohisa Kawasaki 293 Nov 24, 2022
Kanvas is an open-source iOS library for adding effects, drawings, text, stickers, and making GIFs from existing media or the camera.

Kanvas Kanvas is an open-source iOS library for adding effects, drawings, text, stickers, and making GIFs from existing media or the camera.

Tumblr 267 Nov 24, 2022
Lightbox is a convenient and easy to use image viewer for your iOS app

Lightbox is a convenient and easy to use image viewer for your iOS app, packed with all the features you expect: Paginated image slideshow. V

HyperRedink 1.5k Dec 22, 2022
An image download extension of the image view written in Swift for iOS, tvOS and macOS.

Moa, an image downloader written in Swift for iOS, tvOS and macOS Moa is an image download library written in Swift. It allows to download and show an

Evgenii Neumerzhitckii 330 Sep 9, 2022
📸 Instagram-like image picker & filters for iOS

YPImagePicker YPImagePicker is an instagram-like photo/video picker for iOS written in pure Swift. It is feature-rich and highly customizable to match

Yummypets 4k Dec 27, 2022
High-performance animated GIF support for iOS in Swift

Gifu adds protocol-based, performance-aware animated GIF support to UIKit. (It's also a prefecture in Japan). Install Swift Package Manager Add the fo

Reda Lemeden 2.6k Jun 21, 2021
XAnimatedImage is a performant animated GIF engine for iOS written in Swift based on FLAnimatedImage

XAnimatedImage is a performant animated GIF engine for iOS written in Swift based on FLAnimatedImage. An illustration is shown below: Features Plays m

Khaled Taha 561 Sep 9, 2022
An extremely high-performance, lightweight, and energy-efficient pure Swift async web image loader with memory and disk caching for iOS and  Watch.

KFSwiftImageLoader KFSwiftImageLoader is an extremely high-performance, lightweight, and energy-efficient pure Swift async web image loader with memor

Kiavash Faisali 343 Oct 29, 2022