Name: MPDynamicSkeleton
Owner: MercadoLibre
Description: Modularized skeleton with gradient animation
Created: 2017-08-14 14:54:42.0
Updated: 2018-03-28 09:29:39.0
Pushed: 2017-12-06 20:35:14.0
Homepage: null
Size: 259
Language: Swift
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A modularized skeleton with gradient animation - iOS (Swift/Objective-C)
"MPDynamicSkeleton"
Then run pod install
t:
rt MPDynamicSkeleton
ctive-C:
ort MPDynamicSkeleton;
Swift:
headerView = UINib(nibName: "HeaderView", bundle: Bundle.main)
rowView = UINib(nibName: "RowView", bundle: Bundle.main)
exitView = UINib(nibName: "ExitView", bundle: Bundle.main)
containers = [
DynamicSkeletonModel(view: headerView, repeating: 1, left: 0, right: 0, top: 0, height: 82),
DynamicSkeletonModel(view: rowView, repeating: 0, left: 0, right: 0, top: 82, bottom: 50, height: 74),
DynamicSkeletonModel(view: exitView, repeating: 1, left: 0, right: 0, bottom: 0, height: 50)
micSkeleton.sharedInstance.presentSkeleton(view: self.view, models: containers)
Objective-C
b *headerView = [UINib nibWithNibName:@"HeaderView" bundle:[[NSBundle mainBundle] bundleIdentifier]];
b *rowView = [UINib nibWithNibName:@"RowView" bundle:[[NSBundle mainBundle] bundleIdentifier]];
b *exitView = [UINib nibWithNibName:@"ExitView" bundle:[[NSBundle mainBundle] bundleIdentifier]];
micSkeletonModel *header = [[DynamicSkeletonModel alloc] initWithView:headerView repeating:1 left:0 right:0 top:0 height:82];
micSkeletonModel *rows = [[DynamicSkeletonModel alloc] initWithView:rowView repeating:0 left:0 right:0 top:82 bottom:50 height:74];
micSkeletonModel *exit = [[DynamicSkeletonModel alloc] initWithView:exitView repeating:1 left:0 right:0 bottom:0 height:50];
amicSkeleton.sharedInstance presentSkeletonWithView:self.view models:[[NSArray alloc] initWithObjects:header, rows, exit, nil]];
MPDynamicSkeleton is available through CocoaPods. To install it, simply add the following line to your Podfile:
MarceloJoseML, marcelo.jose@mercadolibre.com
MPDynamicSkeleton is available under the the Apache License, Version 2.0