Add Stunning TableView Cell Animations in Swift: iOS Development Guide

Опубликовано: 26 Июль 2026
на канале: Divyesh Gondaliya
2,811
37

Note: This tutorial has been updated (22/12/2017) to use Xcode 9.2, iOS 11.2, and Swift 4.

In this video i will show how to animate table view cell.

Facebook Page :-   / iosinfoandknowledge  
Collectionview inside ScrollView :-    • Collectionview inside Scrollview  
Dynamic height TableView in a Scroll View :-    • Dynamic height TableView in a Scroll View  

My Social Media link is below
-------------
instagram :-   / gdivyesh40  
facebook :- https://www.facebook.com/profile.php?...

/////////////////////////
code .......
/////////////////////////
func animateTable() {
self.tbl_view.reloadData()

let cells = tbl_view.visibleCells
let tableHeight: CGFloat = tbl_view.bounds.size.height

for i in cells {
let cell: UITableViewCell = i as UITableViewCell
cell.transform = CGAffineTransform(translationX: 0, y: tableHeight)
}

var index = 0

for a in cells {
self.tbl_view.isHidden = false
let cell: UITableViewCell = a as UITableViewCell
UIView.animate(withDuration: 1.5, delay: 0.04 * Double(index), usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: .transitionFlipFromTop, animations: {
cell.transform = CGAffineTransform(translationX: 0, y: 0);
}, completion: nil)

index += 1
}
}