All Projects → stuffrabbit → Swiftspreadsheet

stuffrabbit / Swiftspreadsheet

Licence: mit
Spreadsheet CollectionViewLayout in Swift. Fully customizable. 🔶

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Swiftspreadsheet

Cpcollectionviewkit
Interesting UICollectionView layouts and transitions
Stars: ✭ 140 (-76.27%)
Mutual labels:  custom, uicollectionviewlayout, uicollectionview
Transfiguration
Mystical way to transform data into reusable view in Swift
Stars: ✭ 14 (-97.63%)
Mutual labels:  uicollectionview, uicollectionviewlayout
ScaledCenterCarousel
A carousel-based layout for UICollectionView with scaled center item.
Stars: ✭ 16 (-97.29%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Uicollectionviewflexlayout
A drop-in replacement for UICollectionViewFlowLayout
Stars: ✭ 277 (-53.05%)
Mutual labels:  uicollectionviewlayout, uicollectionview
CollectionLayouts
A collection of UICollectionViewLayouts
Stars: ✭ 64 (-89.15%)
Mutual labels:  uicollectionview, uicollectionviewlayout
HorizontalStickyHeaderLayout
Horizontal UICollectionViewLayout with Sticky HeaderView
Stars: ✭ 70 (-88.14%)
Mutual labels:  uicollectionview, uicollectionviewlayout
iOSEasyList
A data-driven UICollectionView and UITableView framework for building fast and flexible lists
Stars: ✭ 29 (-95.08%)
Mutual labels:  uicollectionview, uicollectionviewlayout
CPCollectionViewWheelLayout
An interesting wheel layout of collection view.Swift version:https://github.com/ParsifalC/CPCollectionViewKit
Stars: ✭ 16 (-97.29%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Wslwaterflowlayout
功能描述:WSLWaterFlowLayout 是在继承于UICollectionViewLayout的基础上封装的控件, 目前支持竖向瀑布流(item等宽不等高、支持头脚视图)、水平瀑布流(item等高不等宽 不支持头脚视图)、竖向瀑布流( item等高不等宽、支持头脚视图)、栅格布局瀑布流 4种样式的瀑布流布局。
Stars: ✭ 308 (-47.8%)
Mutual labels:  uicollectionviewlayout, uicollectionview
Persei
Animated top menu for UITableView / UICollectionView / UIScrollView written in Swift
Stars: ✭ 3,395 (+475.42%)
Mutual labels:  custom, uicollectionview
Bouncylayout
Make. It. Bounce.
Stars: ✭ 4,035 (+583.9%)
Mutual labels:  uicollectionviewlayout, uicollectionview
ExcelCollectionViewLayout
An Excel-like UICollectionView's layout.
Stars: ✭ 32 (-94.58%)
Mutual labels:  uicollectionview, uicollectionviewlayout
CollectionViewMultiColumnLayout
A tiled waterfal/mosaic UICollectionViewLayout with support for explicit columns.
Stars: ✭ 13 (-97.8%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Chtcollectionviewwaterfalllayout
The waterfall (i.e., Pinterest-like) layout for UICollectionView.
Stars: ✭ 4,288 (+626.78%)
Mutual labels:  uicollectionviewlayout, uicollectionview
CSStickyFlowLayoutHeaders
UICollectionView replacement for your amazing headers
Stars: ✭ 16 (-97.29%)
Mutual labels:  uicollectionview, uicollectionviewlayout
ScrollAnimationShowcase
[ING] - UIScrollViewやUICollectionViewの特性を活用した表現サンプル
Stars: ✭ 15 (-97.46%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Collectionkit
Reimagining UICollectionView
Stars: ✭ 4,153 (+603.9%)
Mutual labels:  uicollectionviewlayout, uicollectionview
CPCollectionViewWheelLayoutSwift
New url:https://github.com/ParsifalC/CPCollectionViewKit Objective-C Version:https://github.com/ParsifalC/CPCollectionViewWheelLayout
Stars: ✭ 16 (-97.29%)
Mutual labels:  uicollectionview, uicollectionviewlayout
JQCollectionViewAlignLayout
A custom layout object based on flow layout. Added supports for horizontal, vertical alignment and RTL direction of collection view items.(available for both UICollectionView and NSCollectionView)
Stars: ✭ 69 (-88.31%)
Mutual labels:  uicollectionview, uicollectionviewlayout
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 (-51.36%)
Mutual labels:  uicollectionviewlayout, uicollectionview

SwiftSpreadsheet

Version License Platform Swift Package Manager compatible

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Swift 5.0

Installation

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

pod "SwiftSpreadsheet"

Demo

Output sample

Quick start

A short introduction on how to get started:

The rows of the spreadsheet represent a section in the collection view, with columns being the respective items. The leftmost and the rightmost elements of the spreadsheet (leftRowHeadline and rightRowHeadline), as well as the topmost and the bottommost elements (topColumnHeader and bottomColumnFooter) are represented as UISupplementaryView, which — if needed — have to be registered with the respective identifiers of the provided enum ViewKindType (refer to the example code).

The corners of the resulting spreadsheet are represented as UIDecorationView which can be passed as UINib or as AnyClass upon initialization of the layout. To allow more flexibilty you have to pass the given nib or class via the DecorationViewType enum. Its cases hold one of the respective types as associative value: asNib(myNib) or asClass(myClass).

A short example:

//Register SupplementaryViews first, then initialize the layout with optional Nibs/Classes for the DecorationViews
let layout = SpreadsheetLayout(delegate: self,
                               topLeftDecorationViewType: .asNib(topLeftDecorationViewNib),
                               topRightDecorationViewType: .asNib(topRightDecorationViewNib),
                               bottomLeftDecorationViewType: .asClass(bottomLeftDecorationViewClass),
                               bottomRightDecorationViewType: .asClass(bottomRightDecorationViewClass))

//Default is true, set false here if you do not want some of these sides to remain sticky
layout.stickyLeftRowHeader = true
layout.stickyRightRowHeader = true
layout.stickyTopColumnHeader = true
layout.stickyBottomColumnFooter = true

self.collectionView.collectionViewLayout = layout

Implement the provided SpreadsheetLayoutDelegate. The methods are straightforward. Simply pass nil wherever you do not want supplementary views to be displayed (leftmost, rightmost, topmost and bottommost).

Reload Layout:

//On Layout:
layout.resetLayoutCache()
//Helper Method for collection view
collectionView.reloadDataAndSpreadsheetLayout()

So in short:

  1. Register the respective objects of type UISupplementaryView you want to use with the provided identifiers of the enum ViewKindType.
  2. Create a UINib object for each UIDecrationView (corner of the Spreadsheet) and pass it upon initialization of the layout.
  3. Initialize the layout with the provided convenience initializer and pass the delegate as well as the required decoration views.
  4. Implement the SpreadsheetLayoutDelegate.
  5. Set the content of your cells and the supplementary views in the data source methods of your collection view.
  6. Enjoy ;)

Questions

Please refer to the demo application or contact me directly.

Author

Wojtek Kordylewski.

indiControl GmbH owns the Copyright of the respective SwiftSpreadsheet.swift file.

License

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