A simpler way to do cool UITableView animations! (╯°□°)╯︵ ┻━┻
self.tableView.reloadData()
self.tableView.animate(animation: myCoolCellAnimation)
self.tableView.reloadData()
self.tableView.animate(animation: myCoolTableAnimation)
Animations are completely customizable and configurable. TableFlip provides a few built-in defaults that work nicely out the box, if you don’t want to make your own.
TableViewAnimation.Cell.left(duration: 0.5)
TableViewAnimation.Table.top(duration: 0.8)
TableViewAnimation.Cell.fade(duration: 1.0)
let degrees = sin(90.0 * CGFloat.pi/180.0)
let rotationTransform = CGAffineTransform(rotationAngle: degrees)
let flipTransform = CGAffineTransform(scaleX: -1, y: -1)
let customTransform = rotationTransform.concatenating(flipTransform)
let customAnimation = TableViewAnimation.Cell.custom(duration: 0.6, transform: customTransform, options: .curveEaseInOut)
self.tableView.animate(animation: customAnimation, completion: nil)
You can use CocoaPods to install TableFlip
by adding it to your Podfile
:
platform :ios, '8.0'
use_frameworks!
pod 'TableFlip'
Or install it manually by downloading UITableView+Animations.swift
and dropping it in your project.
Hi, I’m Joe everywhere on the web, but especially on Twitter.
See the license for more information about how you can use TableFlip.
If all you liked was the kitty, that’s my baby Gif. Feel free to follow her on the Instagram.