RACollectionViewReorderableTripletLayout

The custom collectionView layout that can perform reordering of cells by dragging it.

  • Owner: ra1028/RACollectionViewReorderableTripletLayout
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

RACollectionViewReorderableTripletLayout

The custom collectionView layout that can perform reordering of cells by dragging it.

I created a new awesome UICollectionView reorderable layout !

Check it out !!

Features

  • Reorder cells by long pressing and dragging it !
  • You can Receive notification to some dragging events.
  • Sorry, has not supported horizontal scroll collection view.
  • Sections two or more are also not supported... Supported !

Please, send me pull request !

Screen shots

screen shot1
screen shot2

Animation

animated gif

Installation

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

pod "RACollectionViewReorderableTripletLayout"

Usage

Add RACollectionViewReorderableTripletLayout to your collection view, then set delegate and datasource.

self.collectionView.delegate = self;
self.collectionView.dataSource = self;

Delegates and Datasource

TripletLayout

- (CGSize)collectionView:(UICollectionView *)collectionView sizeForLargeItemsInSection:(NSInteger)section; //Default to automaticaly grow square !
- (UIEdgeInsets)insetsForCollectionView:(UICollectionView *)collectionView;
- (CGFloat)sectionSpacingForCollectionView:(UICollectionView *)collectionView;
- (CGFloat)minimumInteritemSpacingForCollectionView:(UICollectionView *)collectionView;
- (CGFloat)minimumLineSpacingForCollectionView:(UICollectionView *)collectionView;

ReorderableTripletLayout

- (void)collectionView:(UICollectionView *)collectionView itemAtIndexPath:(NSIndexPath *)fromIndexPath willMoveToIndexPath:(NSIndexPath *)toIndexPath;
- (void)collectionView:(UICollectionView *)collectionView itemAtIndexPath:(NSIndexPath *)fromIndexPath didMoveToIndexPath:(NSIndexPath *)toIndexPath;

- (BOOL)collectionView:(UICollectionView *)collectionView canMoveItemAtIndexPath:(NSIndexPath *)indexPath;
- (BOOL)collectionView:(UICollectionView *)collectionView itemAtIndexPath:(NSIndexPath *)fromIndexPath canMoveToIndexPath:(NSIndexPath *)toIndexPath;
- (CGFloat)reorderingItemAlpha:(UICollectionView * )collectionview; //Default 0.
- (UIEdgeInsets)autoScrollTrigerEdgeInsets:(UICollectionView *)collectionView; //Sorry, has not supported horizontal scroll.
- (UIEdgeInsets)autoScrollTrigerPadding:(UICollectionView *)collectionView;

- (void)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout willBeginDraggingItemAtIndexPath:(NSIndexPath *)indexPath;
- (void)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout didBeginDraggingItemAtIndexPath:(NSIndexPath *)indexPath;
- (void)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout willEndDraggingItemAtIndexPath:(NSIndexPath *)indexPath;
- (void)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout didEndDraggingItemAtIndexPath:(NSIndexPath *)indexPath;

License

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

Main metrics

Overview
Name With Ownerra1028/RACollectionViewReorderableTripletLayout
Primary LanguageObjective-C
Program languageObjective-C (Language Count: 2)
Platform
License:MIT License
所有者活动
Created At2014-05-31 02:06:16
Pushed At2015-07-07 21:23:38
Last Commit At2014-12-30 16:04:04
Release Count10
Last Release Name0.1.0 (Posted on )
First Release Name0.0.1 (Posted on )
用户参与
Stargazers Count1.5k
Watchers Count50
Fork Count192
Commits Count39
Has Issues Enabled
Issues Count16
Issue Open Count10
Pull Requests Count0
Pull Requests Open Count1
Pull Requests Close Count0
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private