VTMagic alternatives and similar libraries
Based on the "Table View / Collection View" category.
Alternatively, view VTMagic 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. -
MCSwipeTableViewCell
👆 Convenient UITableViewCell subclass that implements a swippable content to trigger actions (similar to the Mailbox app). -
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 -
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) -
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. -
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 -
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 VTMagic or a related project?
README
VTMagic
VTMagic is a page container library for iOS, you can custom every page controller by different identifier if you need. It's so easy to use!(中文手册传送门)
[CHANGELOG][CHANGELOG_EN]([变更日志][CHANGELOG_CN])
[preview image](Gif/magic.gif)
Communication
- If you found a bug, and can provide steps to reliably reproduce it, open an issue.
- If you have a feature request, open an issue.
- If you want to contribute, submit a pull request.
Installation
CocoaPods
VTMagic is available through CocoaPods. To install it, simply add the following line to your Podfile, and then import :
pod "VTMagic"
Manually
- Download the project and drop
VTMagic
folder into your project. - Import file
VTMagic.h
.
#import "VTMagic.h"
Requirements
This library requires iOS 6.0+ and Xcode 7.0+.
Usage
To run the example project, clone the repo, and run pod install
from the project directory first.
Integration
- (void)viewDidLoad {
[super viewDidLoad];
[self addChildViewController:self.magicController];
[self.view addSubview:_magicController.view];
[_magicController.magicView reloadData];
}
- (VTMagicController *)magicController {
if (!_magicController) {
_magicController = [[VTMagicController alloc] init];
_magicController.magicView.navigationColor = [UIColor whiteColor];
_magicController.magicView.sliderColor = [UIColor redColor];
_magicController.magicView.layoutStyle = VTLayoutStyleDivide;
_magicController.magicView.switchStyle = VTSwitchStyleDefault;
_magicController.magicView.navigationHeight = 40.f;
_magicController.magicView.dataSource = self;
_magicController.magicView.delegate = self;
}
return _magicController;
}
or like this
#import "VTMagicController.h"
@interface ViewController : VTMagicController
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.magicView.navigationColor = [UIColor whiteColor];
self.magicView.sliderColor = [UIColor redColor];
self.magicView.layoutStyle = VTLayoutStyleDefault;
self.magicView.switchStyle = VTSwitchStyleDefault;
self.magicView.navigationHeight = 40.f;
self.magicView.dataSource = self;
self.magicView.delegate = self;
[self.magicView reloadData];
}
Protocols
You must conform to <VTMagicViewDataSource>
. <VTMagicViewDelegate>
and <VTMagicReuseProtocol>
are optional.
VTMagicViewDataSource
- (NSArray<NSString *> *)menuTitlesForMagicView:(VTMagicView *)magicView {
return _menuList;
}
- (UIButton *)magicView:(VTMagicView *)magicView menuItemAtIndex:(NSUInteger)itemIndex {
static NSString *itemIdentifier = @"itemIdentifier";
UIButton *menuItem = [magicView dequeueReusableItemWithIdentifier:itemIdentifier];
if (!menuItem) {
menuItem = [UIButton buttonWithType:UIButtonTypeCustom];
[menuItem setTitleColor:RGBCOLOR(50, 50, 50) forState:UIControlStateNormal];
[menuItem setTitleColor:RGBCOLOR(169, 37, 37) forState:UIControlStateSelected];
menuItem.titleLabel.font = [UIFont fontWithName:@"Helvetica" size:16.f];
}
return menuItem;
}
- (UIViewController *)magicView:(VTMagicView *)magicView viewControllerAtPage:(NSUInteger)pageIndex {
if (0 == pageIndex) {
static NSString *recomId = @"recom.identifier";
VTRecomViewController *recomViewController = [magicView dequeueReusablePageWithIdentifier:recomId];
if (!recomViewController) {
recomViewController = [[VTRecomViewController alloc] init];
}
return recomViewController;
}
static NSString *gridId = @"grid.identifier";
VTGridViewController *gridViewController = [magicView dequeueReusablePageWithIdentifier:gridId];
if (!gridViewController) {
gridViewController = [[VTGridViewController alloc] init];
}
return gridViewController;
}
VTMagicViewDelegate
- (void)magicView:(VTMagicView *)magicView viewDidAppear:(UIViewController *)viewController atPage:(NSUInteger)pageIndex {
NSLog(@"pageIndex:%ld viewDidAppear:%@", (long)pageIndex, viewController.view);
}
- (void)magicView:(VTMagicView *)magicView viewDidDisappear:(UIViewController *)viewController atPage:(NSUInteger)pageIndex {
NSLog(@"pageIndex:%ld viewDidDisappear:%@", (long)pageIndex, viewController.view);
}
- (void)magicView:(VTMagicView *)magicView didSelectItemAtIndex:(NSUInteger)itemIndex {
NSLog(@"didSelectItemAtIndex:%ld", (long)itemIndex);
}
VTMagicReuseProtocol
This method will be called when page is reused, you should clear old data or reset content offset in here.
- (void)vtm_prepareForReuse {
NSLog(@"clear old data if needed:%@", self);
}
Features
Appearance callbacks
VTMagic will automatically calls the appearance callbacks when user switches the page, maybe you should do something in here, e.g. refresh page info.
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
// do something...
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
// do something...
}
Get magicController
You can get the nearest magicController in any child view controller which is conforms to <VTMagicProtocol>
, after you import file VTMagic.h
.
NSInteger currentPage = self.magicController.currentPage;
UIViewController *viewController = self.magicController.currentViewController;
Switch to specified page
You can switch to some specified page.
[self.magicView switchToPage:3 animated:YES];
[self.magicController switchToPage:3 animated:YES];
Get specified view controller
You can get any page controller by page index, it will return nil if the page is not on the screen.
UIViewController *viewController = [self.magicView viewControllerAtPage:3];
UIViewController *viewController = [self.magicController viewControllerAtPage:3];
Author
VictorTian email: [email protected]
License
VTMagic is released under the MIT license. See LICENSE for details.
<!-- external links -->
*Note that all licence references and agreements mentioned in the VTMagic README section above
are relevant to that project's source code only.