All Projects → ElegantTeam → ETCollectionViewWaterFallLayout

ElegantTeam / ETCollectionViewWaterFallLayout

Licence: MIT license
ETCollectionViewWaterFallLayout is a subclass of UICollectionViewLayout written completely in Swift!

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to ETCollectionViewWaterFallLayout

Bouncylayout
Make. It. Bounce.
Stars: ✭ 4,035 (+13813.79%)
Mutual labels:  collection, layout
CompilerWorks
编译原理相关的工作岗位收集
Stars: ✭ 79 (+172.41%)
Mutual labels:  collection
gw-starter-kit
PEPELAC - Современный инструментарий для вёрстки и создания статичных сайтов с использованием Webpack
Stars: ✭ 30 (+3.45%)
Mutual labels:  layout
UIPheonix
Inspired by game development UIPheonix is a super easy, flexible, dynamic and highly scalable UI framework + concept for building reusable component/control-driven apps for macOS, iOS and tvOS. The same API apply for cross platform development! Think of it as using Lego blocks, you can use similar ones and move them around easy as pie.
Stars: ✭ 29 (+0%)
Mutual labels:  layout
RollingLayoutManager
vrgsoft.net
Stars: ✭ 57 (+96.55%)
Mutual labels:  layout
ShadowDrawable
为View 和 ViewGroup 添加阴影效果--Android,Add shadow for single view or viewgroup layout.
Stars: ✭ 22 (-24.14%)
Mutual labels:  layout
aoc-dev-resources
Useful repositories and articles related to developing software and analysis for Age of Empires II.
Stars: ✭ 40 (+37.93%)
Mutual labels:  collection
counter-interview.dev
a collaborative collection of interview questions collected from both sides of the game: Interviewer(s) and Interviewee.
Stars: ✭ 102 (+251.72%)
Mutual labels:  collection
EasyAlbum
📷 A lightweight, pure-Swift library for pick up photo from your album.
Stars: ✭ 31 (+6.9%)
Mutual labels:  collection
Minimal-Blog
Tailwind CSS Starter Template - Minimal Blog
Stars: ✭ 100 (+244.83%)
Mutual labels:  layout
egjs-grid
A component that can arrange items according to the type of grids
Stars: ✭ 188 (+548.28%)
Mutual labels:  layout
derivejs
DeriveJS is a reactive ODM - Object Document Mapper - framework, a "wrapper" around a database, that removes all the hassle of data-persistence by handling it transparently in the background, in a DRY manner.
Stars: ✭ 54 (+86.21%)
Mutual labels:  collection
ShortURL-Services-List
A list of 600+ URL shorteners (i.e goo.gl, bit.ly)
Stars: ✭ 32 (+10.34%)
Mutual labels:  collection
react-native-bootstrap-styles
Bootstrap style library for React Native
Stars: ✭ 95 (+227.59%)
Mutual labels:  layout
Kali-TX
Customized Kali Linux - Ansible playbook
Stars: ✭ 54 (+86.21%)
Mutual labels:  collection
griding
🧱 lean grid & responsive for react
Stars: ✭ 18 (-37.93%)
Mutual labels:  layout
bootstrap-grid-card
Bootstrap grid in Lovelace UI
Stars: ✭ 25 (-13.79%)
Mutual labels:  layout
rebass
⚛️ React primitive UI components built with styled-system.
Stars: ✭ 7,844 (+26948.28%)
Mutual labels:  layout
content defender
Define allowed or denied content element types in your backend layouts
Stars: ✭ 63 (+117.24%)
Mutual labels:  layout
DragPanel
A nice vertical drag layout, a bit like BottomSheet, but with strong customization!
Stars: ✭ 21 (-27.59%)
Mutual labels:  layout

ETCollectionViewWaterFallLayout

CocoaPods CocoaPods CocoaPods

ETCollectionViewWaterFallLayout is the swift version of CHTCollectionViewWaterfallLayout!

Screen Shots

demo

Installation

The preferred way of installation is via CocoaPods. Just add

pod 'ETCollectionViewWaterFallLayout'

and run pod install. It will install the most recent version of ETCollectionViewWaterFallLayout.

Usage

Below are the public properties and their default values that you can change to customize the layout

let layout = ETCollectionViewWaterfallLayout()
layout.minimumColumnSpacing = 10.0
layout.minimumInteritemSpacing = 10.0
layout.columnCount = 2
layout.headerHeight = 0.0
layout.footerHeight = 0.0
layout.headerInset = .zero
layout.footerInset = .zero
layout.sectionInset = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
collectionView.collectionViewLayout = layout

Required Protocol

Your collection view's delegate must conforms to ETCollectionViewDelegateWaterfallLayout protocol and implement the required method, all you need to do is return the original size of the item:

func collectionView(_ collectionView: UICollectionView, layout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize

Support

  • iOS 9.0+
  • Xcode 8.0+
  • Swift 5.0

Objective-C Version


LICENSE

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].