Quantcast
Channel: UITableViewCell animate resize when user touchdown or tap Cell - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Answer by Serge for UITableViewCell animate resize when user touchdown or tap Cell

$
0
0

Here is an simpler way to da cell animation on tap in Swift 5.0:

func tableView(_ tableView: UITableView, didHighlightRowAt indexPath: IndexPath){    let cell = tableView.cellForRow(at: indexPath)    UIView.animate(withDuration: 0.3) {        cell!.transform = CGAffineTransform(scaleX: 0.8, y: 0.8)    }}func tableView(_ tableView: UITableView, didUnhighlightRowAt indexPath: IndexPath){    let cell = tableView.cellForRow(at: indexPath)    UIView.animate(withDuration: 0.3) {        cell!.transform = .identity    }}

Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>