All Projects → akxo → Paging Collection View Layout

akxo / Paging Collection View Layout

Licence: mit
custom collection view layout that allows you to page by cell, not screen

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Paging Collection View Layout

Zkcarousel
A simple carousel implementation written in Swift
Stars: ✭ 163 (+150.77%)
Mutual labels:  carousel, collectionview
InfiniteCarousel
💈Infinite Carousel Collection View
Stars: ✭ 67 (+3.08%)
Mutual labels:  carousel, collectionview
Jxsegmentedview
A powerful and easy to use segmented view (segmentedcontrol, pagingview, pagerview, pagecontrol, categoryview) (腾讯新闻、今日头条、QQ音乐、网易云音乐、京东、爱奇艺、腾讯视频、淘宝、天猫、简书、微博等所有主流APP分类切换滚动视图)
Stars: ✭ 1,905 (+2830.77%)
Mutual labels:  paging, collectionview
Mspeekcollectionviewdelegateimplementation
A custom paging behavior that peeks the previous and next items in a collection view
Stars: ✭ 265 (+307.69%)
Mutual labels:  collectionview, cell
Multiple-collectionView-in-Multiple-tableView-cells
UICollectionView is embed in UITableViewCell. The collection views are horizontal scrollable. The UITableView can have a section title for each UICollectionView and the number of UICollectionView is equal to the number of sections.
Stars: ✭ 23 (-64.62%)
Mutual labels:  cell, collectionview
Hjcarouseldemo
Stars: ✭ 437 (+572.31%)
Mutual labels:  carousel, collectionview
Fdwaveformview
Reads an audio file and displays the waveform
Stars: ✭ 997 (+1433.85%)
Mutual labels:  cocoapod
Macro Carousel
Carousel as a Vanilla Web Component.
Stars: ✭ 53 (-18.46%)
Mutual labels:  carousel
Collectionview
SwiftUI implementation of a collection view, similar to UICollectionView with UICollectionViewFlowLayout.
Stars: ✭ 37 (-43.08%)
Mutual labels:  collectionview
Swipeselectingcollectionview
A collection view subclass that enables swipe to select multiple cells just like in Photos app.
Stars: ✭ 34 (-47.69%)
Mutual labels:  collectionview
Vue Snap
⚡️ Lightweight Carousel based on CSS Scroll Snapping (Vue 2/3)
Stars: ✭ 60 (-7.69%)
Mutual labels:  carousel
React Carousel
react-carousel
Stars: ✭ 54 (-16.92%)
Mutual labels:  carousel
Tiny Swiper
Ingenious JavaScript Carousel powered by wonderful plugins. Lightweight yet extensible. Import plugins as needed, No more, no less.
Stars: ✭ 1,061 (+1532.31%)
Mutual labels:  carousel
Ng Bootstrap
Angular powered Bootstrap
Stars: ✭ 7,872 (+12010.77%)
Mutual labels:  carousel
L2t Paper Slider
Polymer element for displaying slides in a carousel
Stars: ✭ 53 (-18.46%)
Mutual labels:  carousel
Veluxi Starter
Veluxi Vue.js Starter Project with Nuxt JS and Vuetify
Stars: ✭ 39 (-40%)
Mutual labels:  carousel
React Carousel
Lightweight carousel component for react
Stars: ✭ 56 (-13.85%)
Mutual labels:  carousel
Scenekit Bezier Animations
Create animations over Bezier curves of any number of points
Stars: ✭ 35 (-46.15%)
Mutual labels:  cocoapod
Ngx Siema
Lightweight and simple carousel with no dependencies.
Stars: ✭ 46 (-29.23%)
Mutual labels:  carousel
React Soft Slider
Simple, fast and impartial slider
Stars: ✭ 54 (-16.92%)
Mutual labels:  carousel

paging-collection-view-layout

custom collection view layout that allows you to page by cell, not screen

installation

cocoapods

use cocoapods to install PagingCollectionViewLayout by adding it to your Podfile:

platform :ios, '9.0'
use_frameworks!
pod 'PagingCollectionViewLayout'
import PagingCollectionViewLayout

manual

add PagingCollectionViewLayout.swift to your project

usage

instantiate a layout property

let layout = PagingCollectionViewLayout()

set the following properties

layout.itemSize = 
layout.minimumLineSpacing = 
layout.scrollDirection = .horizontal

instantiate a collection view using the layout property

let collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout)

for snappy scrolling set the following

collectionView.decelerationRate = .fast

note:

collectionView.isPagingEnabled = true

optional customization

vertical scrolling

layout.scrollDirection = .vertical

or since the default is vertical

layout.scrollDirection = .horizontal

section spacing

  • center the item in focus
  • allow the previous item to be visible

set the following property

layout.sectionInset = 
  • horizontal collection view - set left and right insets
  • vertical collection view - set top and bottom insets

skipping items

layout.velocityThresholdPerPage determines the velocity needed to skip an item (default = 2.0)

  • a non zero swipe velocity will result in the collection view scrolling to the prev/next item
  • the number of items skipped = swipe velocity / velocityThresholdPerPage

multiple items per page

layout.numberOfItemsPerPage = 2
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].