MCSwipeTableViewCell alternatives and similar libraries
Based on the "Table View / Collection View" category.
Alternatively, view MCSwipeTableViewCell alternatives based on common mentions on social networks and blogs.
-
IGListKit
A data-driven UICollectionView framework for building fast and flexible lists. -
SwipeCellKit
Swipeable UITableViewCell/UICollectionViewCell based on the stock Mail.app, implemented in Swift. -
CHTCollectionViewWaterfallLayout
The waterfall (i.e., Pinterest-like) layout for UICollectionView. -
HGPlaceholders
Nice library to show placeholders and Empty States for any UITableView/UICollectionView in your project -
YBSlantedCollectionViewLayout
A CollectionView Layout displaying a slanted cells -
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 -
CenteredCollectionView
A lightweight UICollectionViewLayout that 'pages' and centers its cells π‘ written in Swift -
BATabBarController
A TabBarController with a unique animation for selection -
CascadingTableDelegate
A no-nonsense way to write cleaner UITableViewDelegate and UITableViewDataSource in Swift. -
ExpandableCell
β¨ Awesome expandable, collapsible tableview cell for iOS written in Swift 5 -
CardsLayout
:star: Custom card-designed CollectionView layout -
GLTableCollectionView
Netflix and App Store like UITableView with UICollectionView, written in pure Swift 4.2 -
ListPlaceholder
ListPlaceholder is a swift library allows you to easily add facebook style animated loading placeholder to your tableviews or collection views. -
FMMosaicLayout
A drop-in mosaic collection view layout with a focus on simple customizations. -
SwiftSpreadSheet
Spreadsheet CollectionViewLayout in Swift. Fully customizable. πΆ -
KDDragAndDropCollectionView
This component allows for the transfer of data items between collection views through drag and drop -
MYTableViewIndex
A pixel perfect replacement for UITableView section index, written in Swift -
TableFlip
A simpler way to do cool UITableView animations! (β―Β°β‘Β°οΌβ―οΈ΅ β»ββ» -
TableViewDragger
A cells of UITableView can be rearranged by drag and drop. -
DTTableViewManager
Protocol-oriented UITableView management, powered by generics and associated types. -
DataSources
πΎ ππ± Type-safe data-driven CollectionView, TableView Framework. (We can also use ASCollectionNode) -
SwiftReorder
Easy UITableView drag-and-drop cell reordering -
YNExpandableCell
β¨ Awesome expandable, collapsible tableview cell for iOS written in Swift 4 -
TLIndexPathTools
TLIndexPathTools is a small set of classes that can greatly simplify your table and collection views. -
ExpyTableView
Make your table view expandable just by implementing one method. -
CollapsibleTableSectionViewController
:tada: Swift library to support collapsible sections in a table view. -
TLLayoutTransitioning
Enhanced transitioning between UICollectionView layouts in iOS. -
RHPreviewCell
I envied so much Spotify iOS app this great playlist preview cell π, I decided to create my own one πΆ. Now you can give your users ability to quick check "what content is hidden under your UITableViewCell". Great think is that this Library not requires 3D Touch support from user deviceπ₯. -
ASCollectionView
Lightweight custom collection view inspired by Airbnb. -
PagingView
Infinite paging, Smart auto layout, Interface of similar to UIKit. -
TRMosaicLayout
A mosaic collection view layout inspired by Lightbox's Algorithm, written in Swift πΆ -
SquareMosaicLayout
An extandable mosaic UICollectionViewLayout with a focus on extremely flexible customizations :large_orange_diamond: -
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. -
TORoundedTableView
A subclass of UITableView that styles it like Settings.app on iPad -
GenericDataSource
A generic small reusable components for data source implementation for UITableView/UICollectionView in Swift. -
WheelPicker
Customizable wheel picker view implementation for iOS. -
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). -
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 -
EditDistance
Incremental update tool to UITableView and UICollectionView -
ThreeLevelAccordian
Three Level Accordian View for IOS -
ios-dragable-table-cells
Objective-C library for drag-n-drop of UITableViewCells in a navigation hierarchy of view controllers.
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of MCSwipeTableViewCell or a related project?
README
MCSwipeTableViewCell
An effort to show how one would implement a UITableViewCell like the one we can see in the very well executed Mailbox iOS app.
Preview
Exit Mode
The exit mode MCSwipeTableViewCellModeExit
is the original behavior we can see in the Mailbox app. Swiping the cell should make it disappear. Convenient in destructive modes.
Switch Mode
The switch mode MCSwipeTableViewCellModeSwitch
is a new behavior I'm introducing. The cell will bounce back after selecting a state, this allows you to keep the cell. Convenient to switch an option quickly.
API Reference
Please refer to the header file [MCSwipeTableViewCell.h
](MCSwipeTableViewCell/MCSwipeTableViewCell.h) for a complete overview of the capabilities of the class.
Usage
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
MCSwipeTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (!cell) {
cell = [[MCSwipeTableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
// Remove inset of iOS 7 separators.
if ([cell respondsToSelector:@selector(setSeparatorInset:)]) {
cell.separatorInset = UIEdgeInsetsZero;
}
[cell setSelectionStyle:UITableViewCellSelectionStyleGray];
// Setting the background color of the cell.
cell.contentView.backgroundColor = [UIColor whiteColor];
}
// Configuring the views and colors.
UIView *checkView = [self viewWithImageName:@"check"];
UIColor *greenColor = [UIColor colorWithRed:85.0 / 255.0 green:213.0 / 255.0 blue:80.0 / 255.0 alpha:1.0];
UIView *crossView = [self viewWithImageName:@"cross"];
UIColor *redColor = [UIColor colorWithRed:232.0 / 255.0 green:61.0 / 255.0 blue:14.0 / 255.0 alpha:1.0];
UIView *clockView = [self viewWithImageName:@"clock"];
UIColor *yellowColor = [UIColor colorWithRed:254.0 / 255.0 green:217.0 / 255.0 blue:56.0 / 255.0 alpha:1.0];
UIView *listView = [self viewWithImageName:@"list"];
UIColor *brownColor = [UIColor colorWithRed:206.0 / 255.0 green:149.0 / 255.0 blue:98.0 / 255.0 alpha:1.0];
// Setting the default inactive state color to the tableView background color.
[cell setDefaultColor:self.tableView.backgroundView.backgroundColor];
[cell.textLabel setText:@"Switch Mode Cell"];
[cell.detailTextLabel setText:@"Swipe to switch"];
// Adding gestures per state basis.
[cell setSwipeGestureWithView:checkView color:greenColor mode:MCSwipeTableViewCellModeSwitch state:MCSwipeTableViewCellState1 completionBlock:^(MCSwipeTableViewCell *cell, MCSwipeTableViewCellState state, MCSwipeTableViewCellMode mode) {
NSLog(@"Did swipe \"Checkmark\" cell");
}];
[cell setSwipeGestureWithView:crossView color:redColor mode:MCSwipeTableViewCellModeSwitch state:MCSwipeTableViewCellState2 completionBlock:^(MCSwipeTableViewCell *cell, MCSwipeTableViewCellState state, MCSwipeTableViewCellMode mode) {
NSLog(@"Did swipe \"Cross\" cell");
}];
[cell setSwipeGestureWithView:clockView color:yellowColor mode:MCSwipeTableViewCellModeSwitch state:MCSwipeTableViewCellState3 completionBlock:^(MCSwipeTableViewCell *cell, MCSwipeTableViewCellState state, MCSwipeTableViewCellMode mode) {
NSLog(@"Did swipe \"Clock\" cell");
}];
[cell setSwipeGestureWithView:listView color:brownColor mode:MCSwipeTableViewCellModeSwitch state:MCSwipeTableViewCellState4 completionBlock:^(MCSwipeTableViewCell *cell, MCSwipeTableViewCellState state, MCSwipeTableViewCellMode mode) {
NSLog(@"Did swipe \"List\" cell");
}];
return cell;
}
Delegate
MCSwipeTableViewCell has a set of delegate methods in order to track the user behaviors. Take a look at the header file to be aware of all the methods provided by MCSwipeTableViewCellDelegate
.
@interface MCTableViewController () <MCSwipeTableViewCellDelegate>
#pragma mark - MCSwipeTableViewCellDelegate
// Called when the user starts swiping the cell.
- (void)swipeTableViewCellDidStartSwiping:(MCSwipeTableViewCell *)cell;
// Called when the user ends swiping the cell.
- (void)swipeTableViewCellDidEndSwiping:(MCSwipeTableViewCell *)cell;
// Called during a swipe.
- (void)swipeTableViewCell:(MCSwipeTableViewCell *)cell didSwipeWithPercentage:(CGFloat)percentage;
Cell Deletion
In MCSwipeTableViewCellModeExit
mode you may want to delete the cell with a nice fading animation, the following lines will give you an idea how to execute it:
[cell setSwipeGestureWithView:crossView color:redColor mode:MCSwipeTableViewCellModeExit state:MCSwipeTableViewCellState2 completionBlock:^(MCSwipeTableViewCell *cell, MCSwipeTableViewCellState state, MCSwipeTableViewCellMode mode) {
NSLog(@"Did swipe \"Cross\" cell");
// Code to delete your cell...
}];
You can also ask for a confirmation before deleting a cell:
__weak MCTableViewController *weakSelf = self;
[cell setSwipeGestureWithView:crossView color:redColor mode:MCSwipeTableViewCellModeExit state:MCSwipeTableViewCellState1 completionBlock:^(MCSwipeTableViewCell *cell, MCSwipeTableViewCellState state, MCSwipeTableViewCellMode mode) {
NSLog(@"Did swipe \"Cross\" cell");
__strong MCTableViewController *strongSelf = weakSelf;
strongSelf.cellToDelete = cell;
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Delete?"
message:@"Are you sure your want to delete the cell?"
delegate:self
cancelButtonTitle:@"No"
otherButtonTitles:@"Yes", nil];
[alertView show];
}];
Then handle the UIAlertView
action:
#pragma mark - UIAlertViewDelegate
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
// No
if (buttonIndex == 0) {
[_cellToDelete swipeToOriginWithCompletion:^{
NSLog(@"Swiped back");
}];
_cellToDelete = nil;
}
// Yes
else {
// Code to delete your cell...
}
}
There is also an example in the demo project, I recommend to take a look at it.
Changing the trigger percentage
If the default trigger limits do not fit to your needs you can change them with the firstTrigger
(default: 25%) and secondTrigger
(Default: 75%) properties.
cell.firstTrigger = 0.1;
cell.secondTrigger = 0.5;
Reseting cell position
It is possible to put the cell back to it's position when using the MCSwipeTableViewCellModeExit
mode with the -swipeToOriginWithCompletion:
method:
[cell swipeToOriginWithCompletion:^{
NSLog(@"Cell swiped back!");
}];
Installation
CocoaPods
CocoaPods is a dependency manager for Cocoa projects.
$ gem install cocoapods
To integrate MCSwipeTableViewCell into your Xcode project using CocoaPods, specify it in your Podfile
:
pod 'MCSwipeTableViewCell', '~> 2.1.4'
Then, run the following command:
$ pod install
Carthage
Carthage is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.
You can install Carthage with Homebrew using the following command:
$ brew update
$ brew install carthage
To integrate MCSwipeTableViewCell into your Xcode project using Carthage, specify it in your Cartfile
:
github "alikaragoz/MCSwipeTableViewCell" >= 2.1.4
Compatibility
This library is not compatible with auto-layout so you will need to disable auto-layout in your xib properties.
Requirements
- iOS >= 5.0
- ARC
Contact
Ali Karagoz
License
MCSwipeTableViewCell is available under the MIT license. See the LICENSE file for more info.
*Note that all licence references and agreements mentioned in the MCSwipeTableViewCell README section above
are relevant to that project's source code only.