All Projects → yacir → Collectionviewslantedlayout

yacir / Collectionviewslantedlayout

Licence: mit
A CollectionView Layout displaying a slanted cells

Programming Languages

swift
15916 projects
objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Collectionviewslantedlayout

React Virgin
The react-native UI Kit you've been looking for.
Stars: ✭ 1,523 (-24.94%)
Mutual labels:  uikit, ui-design, ui-kit, ui-components
Base
React-UI-Kit - frontend library with ReactJS components
Stars: ✭ 18 (-99.11%)
Mutual labels:  ui-design, ui-kit, ui-components
Components
MobileUI was created thinking of making your hybrid application faster and smaller since you only install what you are really going to use for UI.
Stars: ✭ 125 (-93.84%)
Mutual labels:  uikit, ui-kit, ui-components
Swifthuecolorpicker
iOS HUE color picker
Stars: ✭ 44 (-97.83%)
Mutual labels:  uikit, ui-design, ui-components
Ui Libraries
A collection of UI Frameworks and their platform implementations.
Stars: ✭ 769 (-62.1%)
Mutual labels:  ui-design, ui-kit, ui-components
Verticalcardswiper
A marriage between the Shazam Discover UI and Tinder, built with UICollectionView in Swift.
Stars: ✭ 830 (-59.09%)
Mutual labels:  uikit, uicollectionview, collectionview
Collectionviewpaginglayout
a simple but highly customizable paging layout for UICollectionView.
Stars: ✭ 947 (-53.33%)
Mutual labels:  uikit, uicollectionviewlayout, uicollectionview
Uicollectionview Layouts Kit
📐 A set of custom layouts for UICollectionView with examples [Swift 5.3, iOS 12].
Stars: ✭ 410 (-79.79%)
Mutual labels:  uikit, uicollectionviewlayout, uicollectionview
Basecomponents
BaseComponents aims to provide easily reusable and understandable components to increase productivity with UIKit and Foundation APIs
Stars: ✭ 92 (-95.47%)
Mutual labels:  uikit, ui-components, uicollectionview
Flowlayout
UICollectionView WaterFlowLayout. 瀑布流.
Stars: ✭ 94 (-95.37%)
Mutual labels:  uicollectionviewlayout, uicollectionview, collectionview
Datingapp
Dating UI kit is used for online meet up with girls and boys . The screen contains more than 30 icons and most of all required elements required to design an application like this. The XML and JAVA files contains comments at each and every point for easy understanding. Everything was made with a detail oriented style and followed by today's web trends. Clean coded & Layers are well-organized, carefully named, and grouped.
Stars: ✭ 97 (-95.22%)
Mutual labels:  uikit, ui-design, ui-components
Alignedcollectionviewflowlayout
A collection view layout that gives you control over the horizontal and vertical alignment of the cells.
Stars: ✭ 751 (-62.99%)
Mutual labels:  uikit, uicollectionviewlayout, uicollectionview
My flutter challenges
Flutter project containing all my flutter UI challenges
Stars: ✭ 563 (-72.25%)
Mutual labels:  uikit, ui-design, ui-kit
Flamesui
A css-based web components.
Stars: ✭ 133 (-93.45%)
Mutual labels:  uikit, ui-design, ui-components
Carlenscollectionviewlayout
An easy-to-use Collection View Layout for card-like animation.
Stars: ✭ 478 (-76.44%)
Mutual labels:  uicollectionviewlayout, uicollectionview, collectionview
Vuetify
🐉 Material Component Framework for Vue
Stars: ✭ 33,085 (+1530.61%)
Mutual labels:  ui-design, ui-kit, ui-components
Daisyui
⭐️ ⭐️ ⭐️ ⭐️ ⭐️  Tailwind Components
Stars: ✭ 382 (-81.17%)
Mutual labels:  ui-design, ui-kit, ui-components
Bouncylayout
Make. It. Bounce.
Stars: ✭ 4,035 (+98.87%)
Mutual labels:  uicollectionviewlayout, uicollectionview, collectionview
Pagingkit
PagingKit provides customizable menu UI. It has more flexible layout and design than the other libraries.
Stars: ✭ 1,030 (-49.24%)
Mutual labels:  uikit, uicollectionviewlayout, uicollectionview
Class101 Ui
💅A React-based UI Component Library.
Stars: ✭ 102 (-94.97%)
Mutual labels:  uikit, ui-kit, ui-components

CollectionViewSlantedLayout

Swift 5.1 SMP ready Carthage compatible
codacy badge

CollectionViewSlantedLayout is a subclass of the UICollectionViewLayout allowing the display of slanted cells in a UICollectionView.

CollectionViewSlantedLayout

Features

  • Pure Swift 5.
  • Works with every UICollectionView.
  • Horizontal and vertical scrolling support.
  • Dynamic cells height
  • Fully Configurable

Installation

CocoaPods

CollectionViewSlantedLayout is available through CocoaPods. To install it, simply add the following line to your Podfile:

use_frameworks!
pod 'CollectionViewSlantedLayout', '~> 3.1'

Carthage

You can also install it via Carthage. To do so, add the following to your Cartfile:

github 'yacir/CollectionViewSlantedLayout'

Usage

  1. Import CollectionViewSlantedLayout module to your controller

    import CollectionViewSlantedLayout
  2. Create an instance and add it to your UICollectionView.

    let slantedSayout = CollectionViewSlantedLayout()
    UICollectionView(frame: .zero, collectionViewLayout: slantedSayout)
  3. Use the CollectionViewSlantedCell class for your cells or subclass it.

Find a demo in the Examples folder.

Properties

  • slantingSize:

     @IBInspectable var slantingSize: UInt

    The slanting size. The default value of this property is 75.

  • slantingDirection:

     var slantingDirection: SlantingDirection

    The slanting direction. The default value of this property is upward.

  • slantingAngle:

     fileprivate(set) var slantingAngle: CGFloat

    The angle, in radians, of the slanting. The value of this property could be used to apply a rotation transform on the cell's contentView in the collectionView(_:cellForItemAt:) method implementation.

     if let layout = collectionView.collectionViewLayout as? CollectionViewSlantedLayout {
     	cell.contentView.transform = CGAffineTransform(rotationAngle: layout.rotationAngle)
     }
  • scrollDirection:

     var scrollDirection: UICollectionViewScrollDirection

    The scroll direction of the grid. The grid layout scrolls along one axis only, either horizontally or vertically. The default value of this property is vertical.

  • isFirstCellExcluded:

     @IBInspectable var isFirstCellExcluded: Bool

    Set it to true to disable the slanting for the first cell. The default value of this property is false.

  • isLastCellExcluded:

     @IBInspectable var isLastCellExcluded: Bool

    Set it to true to disable the slanting for the last cell. The default value of this property is false.

  • lineSpacing:

     @IBInspectable var lineSpacing: CGFloat

    The spacing to use between two items. The default value of this property is 10.0.

  • itemSize:

     @IBInspectable var itemSize: CGFloat

    The default size to use for cells. If the delegate does not implement the collectionView(_:layout:sizeForItemAt:) method, the slanted layout uses the value in this property to set the size of each cell. This results in cells that all have the same size. The default value of this property is 225.

  • zIndexOrder:

     var zIndexOrder: ZIndexOrder

    The zIndex order of the items in the layout. The default value of this property is ascending.

Protocols

The CollectionViewDelegateSlantedLayout protocol defines methods that let you coordinate with a CollectionViewSlantedLayout object to implement a slanted layout. The CollectionViewDelegateSlantedLayout protocol has the following methods:

optional func collectionView(_ collectionView: UICollectionView,
                             layout collectionViewLayout: CollectionViewSlantedLayout,
                             sizeForItemAt indexPath: IndexPath) -> CGFloat

This method asks the delegate for the size of the specified item’s cell.

If you do not implement this method, the slanted layout uses the values in its itemSize property to set the size of items instead. Your implementation of this method can return a fixed set of sizes or dynamically adjust the sizes based on the cell’s content.

Author

Yassir Barchi

Acknowledgement

This framework is inspired by this prototype released by Matt Bridges.

License

CollectionViewSlantedLayout is available under the MIT license. See the LICENSE file for more info.

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