All Projects → netguru → Carlenscollectionviewlayout

netguru / Carlenscollectionviewlayout

Licence: mit
An easy-to-use Collection View Layout for card-like animation.

Programming Languages

swift
15916 projects
swift4
162 projects

Projects that are alternatives of or similar to Carlenscollectionviewlayout

Flowlayout
UICollectionView WaterFlowLayout. 瀑布流.
Stars: ✭ 94 (-80.33%)
Mutual labels:  uicollectionviewlayout, uicollectionview, collectionview
Bouncylayout
Make. It. Bounce.
Stars: ✭ 4,035 (+744.14%)
Mutual labels:  uicollectionviewlayout, uicollectionview, collectionview
Collectionviewslantedlayout
A CollectionView Layout displaying a slanted cells
Stars: ✭ 2,029 (+324.48%)
Mutual labels:  uicollectionviewlayout, uicollectionview, collectionview
Verticalcardswiper
A marriage between the Shazam Discover UI and Tinder, built with UICollectionView in Swift.
Stars: ✭ 830 (+73.64%)
Mutual labels:  uicollectionview, collectionview, cards
Chatlayout
ChatLayout is an alternative solution to MessageKit. It uses custom UICollectionViewLayout to provide you full control over the presentation as well as all the tools available in UICollectionView. It supports dynamic cells and supplementary view sizes.
Stars: ✭ 184 (-61.51%)
Mutual labels:  uicollectionviewlayout, uicollectionview, collectionview
Uicollectionview Layouts Kit
📐 A set of custom layouts for UICollectionView with examples [Swift 5.3, iOS 12].
Stars: ✭ 410 (-14.23%)
Mutual labels:  uicollectionviewlayout, uicollectionview
HorizontalStickyHeaderLayout
Horizontal UICollectionViewLayout with Sticky HeaderView
Stars: ✭ 70 (-85.36%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Transfiguration
Mystical way to transform data into reusable view in Swift
Stars: ✭ 14 (-97.07%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Uicollectionviewflexlayout
A drop-in replacement for UICollectionViewFlowLayout
Stars: ✭ 277 (-42.05%)
Mutual labels:  uicollectionviewlayout, uicollectionview
ExcelCollectionViewLayout
An Excel-like UICollectionView's layout.
Stars: ✭ 32 (-93.31%)
Mutual labels:  uicollectionview, uicollectionviewlayout
ScrollAnimationShowcase
[ING] - UIScrollViewやUICollectionViewの特性を活用した表現サンプル
Stars: ✭ 15 (-96.86%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Collectionkit
Reimagining UICollectionView
Stars: ✭ 4,153 (+768.83%)
Mutual labels:  uicollectionviewlayout, uicollectionview
Hjcarouseldemo
Stars: ✭ 437 (-8.58%)
Mutual labels:  uicollectionviewlayout, collectionview
ScaledCenterCarousel
A carousel-based layout for UICollectionView with scaled center item.
Stars: ✭ 16 (-96.65%)
Mutual labels:  uicollectionview, uicollectionviewlayout
CollectionLayouts
A collection of UICollectionViewLayouts
Stars: ✭ 64 (-86.61%)
Mutual labels:  uicollectionview, uicollectionviewlayout
iOSEasyList
A data-driven UICollectionView and UITableView framework for building fast and flexible lists
Stars: ✭ 29 (-93.93%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Wslwaterflowlayout
功能描述:WSLWaterFlowLayout 是在继承于UICollectionViewLayout的基础上封装的控件, 目前支持竖向瀑布流(item等宽不等高、支持头脚视图)、水平瀑布流(item等高不等宽 不支持头脚视图)、竖向瀑布流( item等高不等宽、支持头脚视图)、栅格布局瀑布流 4种样式的瀑布流布局。
Stars: ✭ 308 (-35.56%)
Mutual labels:  uicollectionviewlayout, uicollectionview
Swiftdatatables
A Swift Data Table package, display grid-like data sets in a nicely formatted table for iOS. Subclassing UICollectionView that allows ordering, and searching with extensible options.
Stars: ✭ 287 (-39.96%)
Mutual labels:  uicollectionviewlayout, uicollectionview
Compositional Layouts Kit
📏 A set of advanced compositional layouts for UICollectionView with examples [Swift 5.3, iOS 13].
Stars: ✭ 317 (-33.68%)
Mutual labels:  uicollectionviewlayout, collectionview
Kddraganddropcollectionview
This component allows for the transfer of data items between collection views through drag and drop
Stars: ✭ 476 (-0.42%)
Mutual labels:  uicollectionview, collectionview

CarLensCollectionViewLayout

An easy-to-use Collection View Layout for card-like animation 🎉

CarLensCollectionViewLayout was created out of the implementation in CarLens application 🚘. The image above exactly shows the screen from the app!

Requirements

CarLensCollectionViewLayout is written in Swift 4.2 and supports iOS 9.0+.

Usage

Basic Usage

The two main steps are needed for the configuration of CarLensCollectionViewLayout:

Step 1

Assign CarLensCollectionViewLayout to yours collection view layout:

collectionView.collectionViewLayout = CarLensCollectionViewLayout()

or initialize your collection view with CarLensCollectionViewLayout:

UICollectionView(frame: .zero, collectionViewLayout: CarLensCollectionViewLayout())

Step 2

Subsclass CarLensCollectionViewCell and call configure(topView: UIView, cardView: UIView) during the cell’s initialization:

class CollectionViewCell: CarLensCollectionViewCell {
    override init(frame: CGRect) {
	super.init(frame: frame)
	configure(topView: upperView, cardView: bottomView)
    }
}

The sample implementation is available in Demo project.

Customization

Layout

You can also initialize CarLensCollectionViewLayout with a CarLensCollectionViewLayoutOptions object by passing any of the parameters available. Others will be configured automatically.

Parameters:

minimumSpacing - A minimum spacing between cells.

decelerationRate - A deceleration for a scroll view.

shouldShowScrollIndicator - A value indicating whether collection view should have a scroll indicator.

itemSize - The size to use for cells.

Example:

let options = CarLensCollectionViewLayoutOptions(minimumSpacing: 40)
collectionView.collectionViewLayout = CarLensCollectionViewLayout(options: options)

Cell

While subsclassing CarLensCollectionViewCell you can call configure(...) with an additional parameter topViewHeight. The card view height will be calculated based on this value.

Example:

class CollectionViewCell: CarLensCollectionViewCell {
    override init(frame: CGRect) {
	super.init(frame: frame)
	configure(topView: upperView, cardView: bottomView, topViewHeight: 300)
    }
}

Installation

CocoaPods

If you're using CocoaPods, add the following dependency to your Podfile:

use_frameworks!
pod 'CarLensCollectionViewLayout', '~> 1.2.0'

Carthage

If you're using Carthage, add the following dependency to your Cartfile:

github "netguru/CarLensCollectionViewLayout" ~> 1.2.0

About

This project is made with ❤️ by Netguru and maintained by Anna-Mariia Shkarlinska.

License

CarLensCollectionViewLayout is licensed under the MIT License. See LICENSE.md for more info.

Read More

Related Links

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].