You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func animateTable(tableView: UITableView) {
tableView.reloadData()
let cells = tableView.visibleCells
let tableHeight: CGFloat = tableView.bounds.size.height
for i in cells {
let cell: UITableViewCell = i
cell.transform = CGAffineTransformMakeTranslation(0, tableHeight)
}
var index = 0
for a in cells {
let cell: UITableViewCell = a
UIView.animateWithDuration(1.5, delay: 0.05 * Double(index), usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [], animations: {
cell.transform = CGAffineTransformMakeTranslation(0, 0);
}, completion: nil)
index += 1
}
}
func animateXCellTableView(tableView: UITableView) {
tableView.reloadData()
let cells = tableView.visibleCells
for i in cells {
let cell: UITableViewCell = i
cell.frame.origin.x = tableView.frame.width
}
var index = 0
for a in cells {
let cell: UITableViewCell = a
UIView.animateWithDuration(1.0, delay: 0.05 * Double(index), usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [], animations: {
cell.frame.origin.x = 0
}, completion: nil)
index += 1
}
}
The text was updated successfully, but these errors were encountered:
Fix this code and add this animations:
The text was updated successfully, but these errors were encountered: