Skip to content

Very simple Shimmer loader for all View, TableView or CollectionView !

License

Notifications You must be signed in to change notification settings

LeBzul/SimpleShimmer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Platform Language

SimpleShimmer

Img

Img Img

Img Img

Installation

Import SimpleShimmer folder in your project (or use example project)

Usage

Activate UIView Shimmer in InterfaceBuilder :

Img

Or programmatically :

myView.withShimmer = true

Start shimmer

For a specific (activated) UIView :

myView.startShimmerAnimation()
myView.stopShimmerAnimation()

For all (activated) UIView in UIViewController :

startShimmerAnimation()
stopShimmerAnimation()

For cell in UITableView or UICollectionView :

myTableView.startShimmerAnimation(withIdentifier: "shimmerCell", numberOfRows: 2, numberOfSections: 5)
myTableView.stopShimmerAnimation()
myCollectionView.startShimmerAnimation(withIdentifier: "collectionShimmerCell", numberOfRows: 2, numberOfSections: 5)
myCollectionView.stopShimmerAnimation()

ShimmerOptions

Change animation type :

ShimmerOptions.instance.animationType = .classic
.classic .fade
Img Img
Animation properties :
Properties Possible value Comment
animationDuration CGFloat Change animation duration
animationDelay CGFloat Delay to restart animation after end
animationAutoReserse Bool Reverse animation
animationDirection topBottom, bottomTop, leftRight, rightLeft Change animation direction (for animation type classic)
gradientColor UIColor Change gradient color (for animation type classic)
Shimmer style :
Properties Possible value Comment
gradientColor UIColor Change gradient color (for animation type classic)
borderWidth CGFloat Add border to Shimmer view
borderColor UIColor Change color to Shimmer view
backgroundColor UIColor Change background color to Shimmer view

Author

Guillian Drouin, [email protected]

License

SimpleShimmer is available under the MIT license. See the LICENSE file for more info. If you use it, I'll be happy to know about it.

About

Very simple Shimmer loader for all View, TableView or CollectionView !

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages