- iOS 9.0+
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate TableViewReloadAnimation into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
target '<Your Target Name>' do
pod 'TableViewReloadAnimation', '~> 0.0.5'
end
Then, run the following command:
$ pod install
import TableViewReloadAnimation
in viewDidAppear
// left animation
tableView.reloadData(
with: .simple(duration: 0.45, direction: .left(useCellsFrame: true),
constantDelay: 0))
// right with spring
tableView.reloadData(
with: .spring(duration: 0.45, damping: 0.65, velocity: 1, direction: .right(useCellsFrame: false),
constantDelay: 0))
// rotation with spring
tableView.reloadData(
with: .spring(duration: 0.45, damping: 0.65, velocity: 1, direction: .rotation(angle: Double.pi / 2),
constantDelay: 0))
// rotation 3d
tableView.reloadData(
with: .simple(duration: 0.75, direction: .rotation3D(type: .ironMan),
constantDelay: 0))