Reputation: 20068
I have a custom animation for my table view done inside willDisplay
delegate.
I want this animation to be disabled in one case, but I don't know how to do this.
I tried doing this in viewDidLoad
:
UIView.setAnimationsEnabled(false)
But the animation is still performed. Any other way to disable animations on IOS ?
Upvotes: 1
Views: 350
Reputation: 100503
You can disable it yourself
var enabled = true
func tableView(_ tableView: UITableView,willDisplay cell: UITableViewCell,forRowAt indexPath: IndexPath) {
if enabled {
// do animation
}
else {
}
}
Upvotes: 2