TLLayoutTransitioning alternatives and similar libraries
Based on the "Table View / Collection View" category.
Alternatively, view TLLayoutTransitioning alternatives based on common mentions on social networks and blogs.
-
CHTCollectionViewWaterfallLayout
The waterfall (i.e., Pinterest-like) layout for UICollectionView. -
BouncyLayout
BouncyLayout is a collection view layout that makes your cells bounce. -
CollectionKit
A modern Swift framework for building reusable data-driven collection components. -
MCSwipeTableViewCell
👆 Convenient UITableViewCell subclass that implements a swippable content to trigger actions (similar to the Mailbox app). -
HGPlaceholders
Nice library to show and create placeholders and Empty States for any UITableView/UICollectionView in your project -
YBSlantedCollectionViewLayout
UICollectionViewLayout with slanted content. -
ReverseExtension
A UITableView extension that enables cell insertion from the bottom of a table view. -
Bohr
Bohr allows you to set up a settings screen for your app with three principles in mind: ease, customization and extensibility. -
TimelineTableViewCell
Simple timeline view implemented by UITableViewCell written in Swift 3.0. -
CenteredCollectionView
A lightweight CollectionView that 'pages' and centers it's cells 🎡 written in Swift. -
CascadingTableDelegate
A no-nonsense way to write cleaner UITableViewDelegate and UITableViewDataSource in Swift. -
GLTableCollectionView
Netflix and App Store like UITableView with UICollectionView -
CardsLayout
Nice card-designed custom collection view layout. -
ExpandableCell
Fully refactored YNExapnadableCell with more concise, bug free. Awesome expandable, collapsible tableview cell for iOS written in Swift 3 -
SwiftSpreadSheet
Spreadsheet CollectionViewLayout in Swift. Fully customizable. -
KDDragAndDropCollectionView
Dragging & Dropping data across multiple UICollectionViews. -
ListPlaceholder
ListPlaceholder is a swift library allows you to easily add facebook style animated loading placeholder to your tableviews or collection views -
DataSources
Type-safe data-driven List-UI Framework. (We can also use ASCollectionNode) -
DTTableViewManager
Protocol-oriented UITableView management, powered by generics and associated types. -
TLIndexPathTools
TLIndexPathTools is a small set of classes that can greatly simplify your table and collection views. -
SwiftReorder
Add drag-and-drop reordering to any table view with just a few lines of code. Robust, lightweight, and completely customizable. -
ExpyTableView
Make your table view expandable just by implementing one method. -
PagingView
Infinite paging, Smart auto layout, Interface of similar to UIKit. -
RHPreviewCell
I envied so much Spotify iOS app this great playlist preview cell. Now you can give your users ability to quick check "what content is hidden under your UITableViewCell". -
CollapsibleTableSectionViewController
A swift library to support collapsible sections in a table view. -
SquareMosaicLayout
An extandable mosaic UICollectionViewLayout with a focus on extremely flexible customizations -
SectionScrubber
A component to quickly scroll between collection view sections -
HoverConversion
HoverConversion realized vertical paging with UITableView. UIViewController will be paging when reaching top or bottom of UITableView contentOffset. -
GenericDataSource
A generic small reusable components for data source implementation for UITableView/UICollectionView in Swift. -
PJFDataSource
PJFDataSource is a small library that provides a simple, clean architecture for your app to manage its data sources while providing a consistent user interface for common content states (i.e. loading, loaded, empty, and error). -
WheelPicker
Customizable wheel picker view implementation for iOS. -
AZCollectionViewController
Easy way to integrate pagination with dummy views in CollectionView, make Instagram Discover within minutes. -
AZTableViewController
Elegant and easy way to integrate pagination with dummy views. -
ThreeLevelAccordian
This is a customisable three level accordian with options for adding images and accessories images. -
ios-dragable-table-cells
Support for drag-n-drop of UITableViewCells in a navigation hierarchy of view controllers. You drag cells by tapping and holding them.
Get performance insights in less than 4 minutes.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of TLLayoutTransitioning or a related project?
README
TLLayoutTransitioning
Enhanced transitioning between UICollectionView layouts in iOS.
Overview
TLLayoutTransitioning provides a TLLayoutTransition
transition layout subclass and a UICollectionView+TLTransitioning
category that combine to solve a few problems with collection view layout transitioning:
UICollectionViewLayoutTransition
does not handle content offset well, often leaving cells where you don't want them.TLTransitionLayout
provides elegant control of content offset with Minimal, Visible, Center, Top, Left, Bottom or Right placement options relative to one or more index paths.UICollectionViewLayoutTransition
does not support supplementary views.TLTransitionLayout
provides support for any supplementary view kinds specified in the initializer.-[UICollectionView setCollectionViewLayout:animated:completion]
has serious known bugs in iOS7 and does not provide any animation options. TLLayoutTransitioning provides a robust alternative to this API with support for animation duration, 30+ easing curves and content offset control. This is done by usingCADisplayLink
to drive an interactiveTLTransitionLayout
as a non-interactive animation. Note that this approach may not perform as well as Core Animation with more complex cells.
Check out the demos in the Examples workspace!
TLTransitionLayout Class
TLTransitionLayout
is a subclass of UICollectionViewTransitionLayout
that interpolates linearly between layouts and optionally between the current content offset and a specified final offset.
The final offset is specified
by setting the toContentOffset
property. The UICollectionView+TLTransitioning
category
provides an API for calculating Minimal, Visible, Center, Top, Left, Bottom or Right offset placements relative to one or more index paths.
The basic usage is as follows:
- (void)someViewControllerEventHandler
{
UICollectionViewLayout *nextLayout = ...;
self.transitionLayout = (TLTransitionLayout *)[self.collectionView startInteractiveTransitionToCollectionViewLayout:nextLayout
completion:^(BOOL completed, BOOL finish) {
if (finish) {
self.collectionView.contentOffset = self.transitionLayout.toContentOffset;
self.transitionLayout = nil;
}
}];
NSArray *indexPaths = ...;// some selection of index paths to place
self.transitionLayout.toContentOffset = [self.collectionView toContentOffsetForLayout:self.transitionLayout indexPaths:indexPaths placement:TLTransitionLayoutIndexPathPlacementCenter];
}
- (UICollectionViewTransitionLayout *)collectionView:(UICollectionView *)collectionView transitionLayoutForOldLayout:(UICollectionViewLayout *)fromLayout newLayout:(UICollectionViewLayout *)toLayout
{
NSArray *supplementaryKinds = ...; // optional supplementary view kinds
return [[TLTransitionLayout alloc] initWithCurrentLayout:fromLayout nextLayout:toLayout supplementaryKinds:supplementaryKinds];
}
Note that the collection view will reset contentOffset
after the transition is finalized, but as illustrated above, this can be negated by setting it back to toContentOffset
in the completion block.
Canceling a Transition
If you want to stop the current transition to start a new one from the current position, you need a way to stop the current transition in-place. Apple provides finishInteractiveTransition
and cancelInteractiveTransition
to end a transition, but neither of these stops the transition in-place. So, TLLayoutTransitioning provides such a method:
[self.collectionView cancelInteractiveTransitionInPlaceWithCompletion:^(){
// initiate new transition in the completion block
}];
You can find out if a transition is currently in progress by checking the isInteractiveTransitionInProgress
on UICollectionView
.
UICollectionView+TLTransitioning Category
The UICollectionView+TLTransitioning
category provides some of useful methods for calculating for interactive transitions. In particular, the toContentOffsetForLayout:indexPaths:placement
API calculates final content offset values to achieve Minimal, Visible, Center, Top, Left, Bottom or Right placements for one or more index paths. The expanded version of this API provides for even further fine-tuning and supports transitioning to a different collection view size and content inset:
- (CGPoint)toContentOffsetForLayout:(UICollectionViewTransitionLayout *)layout
indexPaths:(NSArray *)indexPaths
placement:(TLTransitionLayoutIndexPathPlacement)placement
placementAnchor:(CGPoint)placementAnchor
placementInset:(UIEdgeInsets)placementInset
toSize:(CGSize)toSize
toContentInset:(UIEdgeInsets)toContentInset
UICollectionView+TLTransitioning
also provides an alternative to -[UICollectionView setCollectionViewLayout:animated:completion]
for non-interactive animation between layouts with support for animation duration, 30 built-in easing curves (courtesy of Warren Moore's AHEasing library), user defined easing curves (by defining custom AHEasingFunctions
) and content offset control. The basic transition call is as follows:
TLTransitionLayout *layout = (TLTransitionLayout *)[collectionView transitionToCollectionViewLayout:toLayout duration:2 easing:QuarticEaseInOut completion:nil];
CGPoint toOffset = [collectionView toContentOffsetForLayout:layout indexPaths:@[indexPath] placement:TLTransitionLayoutIndexPathPlacementCenter];
layout.toContentOffset = toOffset;
where the view controller is configured to provide an instance of TLTransitionLayout
as described above. Check out the Resize sample project in the Examples workspace to see this in action.
Installation
CocoaPods
Add the following to your Podfile
pod 'TLLayoutTransitioning'
Carthage
Add the following to your Cartfile
github "wtmoose/TLLayoutTransitioning"
Note that TLLayoutTransitioning has a dependency on AHEasing, which
does not support Carthage. As a workaround, TLLayoutTransitioning's Cartfile uses the wtmoose/AHEasing
fork which adds Carthage support.
To request Carthage support for the canonical AHEasing library, consider leaving a comment in favor of reopening the Add dynamic frameworks support pull request.
Manual
If you're not using a dependency manager, check out the noframeworks branch and copy the following files into your project:
TLTransitionLayout.h
TLTransitionLayout.m
UICollectionView+TLTransitionAnimator.h
UICollectionView+TLTransitionAnimator.m
And copy the following files from AHEasing:
easing.h
easing.c
Examples
Open the Examples workspace (not the project) to run the sample app. The following examples are included:
Resize
The Resize example combines TLTransitionLayout
and -[UICollectionView+TLTransitioning transitionToCollectionViewLayout:duration:easing:completion:]
as a better alternative to -[UICollectionView setCollectionViewLayout:animated:completion]
. Experiment with different durations, easing curves and content offset options on the settings panel. Toggle "show section headers" to see transitioning supplementary views.
Pinch
The Pinch example demonstrates a simple pinch-driven interactive transition using TLTransitionLayout
. The destination contentOffset
is selected such that the initial visible cells remain centered. Or if a cell is tapped, the contentOffset
the cell is centered.
About SwiftKick Mobile
We build high quality apps! Get in touch if you need help with a project.