Mastertrap
Mastertrap

Reputation: 63

How can I flip an entire Tableview when a button is pressed in swift?

I have a tableView and a button in a View Controller. When the button is pressed, the data from cells is updated with other texts. I want to add a flip animation to the cells, so when the button is pressed, the cell flips and the data from cells is changed. My problem is that I don't know how to add the flip cell animation.

Can anyone give me a hint on how to do this flip animation on cells?

Thank you and have a nice day!

Upvotes: 1

Views: 417

Answers (1)

Kathiresan Murugan
Kathiresan Murugan

Reputation: 2962

  UIView.transition(with: /* your tableview */,
                          duration: 0.5,
                          options: .transitionFlipFromLeft,
                          animations: nil,
                          completion: nil)

Upvotes: 2

Related Questions