All Projects → yuriy-tolstoguzov → ScaledCenterCarousel

yuriy-tolstoguzov / ScaledCenterCarousel

Licence: MIT license
A carousel-based layout for UICollectionView with scaled center item.

Programming Languages

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

Projects that are alternatives of or similar to ScaledCenterCarousel

Lxreorderablecollectionviewflowlayout
Extends `UICollectionViewFlowLayout` to support reordering of cells. Similar to long press and pan on books in iBook.
Stars: ✭ 1,831 (+11343.75%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Squaremosaiclayout
An extandable mosaic UICollectionViewLayout with a focus on extremely flexible customizations 🔶
Stars: ✭ 243 (+1418.75%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Collectionviewslantedlayout
A CollectionView Layout displaying a slanted cells
Stars: ✭ 2,029 (+12581.25%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Bubblecollectionviewlayout
Create bubble layout of UICollectionView using custom layout
Stars: ✭ 79 (+393.75%)
Mutual labels:  uicollectionview, uicollectionviewlayout
CollectionViewMultiColumnLayout
A tiled waterfal/mosaic UICollectionViewLayout with support for explicit columns.
Stars: ✭ 13 (-18.75%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Flowlayout
UICollectionView WaterFlowLayout. 瀑布流.
Stars: ✭ 94 (+487.5%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Admozaiccollectionviewlayout
ADMozaicCollectionViewLayout is yet another UICollectionViewLayout subclass that implements "brick", "mozaic" or Pinterest style layout.
Stars: ✭ 226 (+1312.5%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Centeredcollectionview
A lightweight UICollectionViewLayout that 'pages' and centers its cells 🎡 written in Swift
Stars: ✭ 965 (+5931.25%)
Mutual labels:  uicollectionview, uicollectionviewlayout
ExcelCollectionViewLayout
An Excel-like UICollectionView's layout.
Stars: ✭ 32 (+100%)
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 (+331.25%)
Mutual labels:  uicollectionview, uicollectionviewlayout
CPCollectionViewWheelLayout
An interesting wheel layout of collection view.Swift version:https://github.com/ParsifalC/CPCollectionViewKit
Stars: ✭ 16 (+0%)
Mutual labels:  uicollectionview, uicollectionviewlayout
CollectionLayouts
A collection of UICollectionViewLayouts
Stars: ✭ 64 (+300%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Drcollectionviewtablelayout Ios
UICollectionView 2d-table / grid / spreadsheet layout
Stars: ✭ 74 (+362.5%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Cpcollectionviewkit
Interesting UICollectionView layouts and transitions
Stars: ✭ 140 (+775%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Pagingkit
PagingKit provides customizable menu UI. It has more flexible layout and design than the other libraries.
Stars: ✭ 1,030 (+6337.5%)
Mutual labels:  uicollectionview, uicollectionviewlayout
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 (+1050%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Blueprints
🌀 Blueprints - A framework that is meant to make your life easier when working with collection view flow layouts.
Stars: ✭ 874 (+5362.5%)
Mutual labels:  uicollectionview, uicollectionviewlayout
Collectionviewpaginglayout
a simple but highly customizable paging layout for UICollectionView.
Stars: ✭ 947 (+5818.75%)
Mutual labels:  uicollectionview, uicollectionviewlayout
CPCollectionViewWheelLayoutSwift
New url:https://github.com/ParsifalC/CPCollectionViewKit Objective-C Version:https://github.com/ParsifalC/CPCollectionViewWheelLayout
Stars: ✭ 16 (+0%)
Mutual labels:  uicollectionview, uicollectionviewlayout
HorizontalStickyHeaderLayout
Horizontal UICollectionViewLayout with Sticky HeaderView
Stars: ✭ 70 (+337.5%)
Mutual labels:  uicollectionview, uicollectionviewlayout

ScaledCenterCarousel

codebeat badge CI Status Version License Platform

A carousel-based layout for UICollectionView with scaled center item. It contains optional paginator to force user to select single item which will be presented exaclty at center of carousel. Before using library, make sure to have a look at Example project.

alt tag

Example

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

Customization

The library is made purposely simple, but there are number of ways you can customize it. Most of properties could be set from IB via IBInspectable.

Layout

  • centerCellHeight/centerCell.height - The height of cell at the center position.
  • centerCellWidth/centerCell.width - The width of cell at the center position.
  • normalCellHeight/normalCell.height - The height of cells that far enough from the center position.
  • normalCellWidth/normalCell.width - The width of cells that far enough from the center position.
  • proposedContentOffset - The content offset that will be set once after next data source change. Think about adding items after you get them from web service and you want to pre-select one of them.

Pagination (UICollectionViewDelegate)

If you want user to be able to select only one item at a time, you probably will use built-in YTScaledCenterCarouselPaginator/ScaledCenterCarouselPaginator and set it as your UICollectionView delegate.

It has next delegate methods:

  • -carousel:didSelectElementAtIndex: / carousel(_,didSelectElementAt)
  • -carousel:didScrollToVisibleCells: / carousel(_,didScrollTo)

If your data source will adopt YTScaledCenterCarouselDataSource/ScaledCenterCarouselDataSource protocol. It will always know what item is selected now and can use this knowledge to add some customization to selected cells. Also it encouraged to check cell selected state, because it's updated accordingly as well.

Requirements

iOS 7+

Installation

CocoaPods

To install it through CocoaPods, simply add the following line to your Podfile:

pod "ScaledCenterCarousel"      # ObjC version

pod "ScaledCenterCarouselSwift" # Swift version

Run update command in your terminal:

$ pod install

Carthage

Add this line to your Cartfile:

github "yuriy-tolstoguzov/ScaledCenterCarousel"

Run update command in your terminal:

$ carthage update

Author

yuriy-tolstoguzov, [email protected]

Contribution

If you want to contribute, here is couple of topics I have in mind:

  • Swift migration
  • Support for vertical layout
  • Documentation improvements

Feel free to make a pull requests or contact me if you have questions.

License

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