                 cell.alpha = 0.0
                 UIView.animate(withDuration: duration, delay: animationDelay, options: .curveEaseInOut, animations: {
                     cell.alpha = 1.0
-                }, completion: nil)
+                }, completion: { finished in
+                    completion?()
+                })
             }
         } else {
             let animation = UITableView.fadeAnimationTransition
             animation.duration = duration
 
             self.layer.add(animation, forKey: "UITableViewReloadDataAnimationKey")
+
+            DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + DispatchTimeInterval.milliseconds(Int(duration*1000))) {
+                completion?()
+            }
         }
     }
 


fileprivate extension UITableView {

    func animateTableViewWithTransform(duration: TimeInterval, transform: CGAffineTransform, staggered: Bool) {
        for (index, cell) in self.visibleCells.enumerated() {
            let delay: TimeInterval = staggered ? duration/Double(self.visibleCells.count)*Double(index) : 0.0
            let damping: CGFloat = staggered ? 0.55 : 0.75


            UIView.animate(withDuration: duration, delay: delay, usingSpringWithDamping: damping, initialSpringVelocity: 0.0, options: .curveEaseInOut, animations: {
                cell.layer.setAffineTransform(.identity)
            }, completion: { finished in
                completion?()
            })
        }
    }

    func animateTableViewWithDirection(duration: TimeInterval, direction: TableViewAnimation.AnimationDirection, staggered: Bool, strongDamping: Bool, completion: (() -> Void)? = nil) {
        for (index, cell) in self.visibleCells.enumerated() {
            let delay: TimeInterval = staggered ? duration/Double(self.visibleCells.count)*Double(index) : 0.0
            let damping: CGFloat = staggered ? 0.55 : 0.75

            let cellTransform = CGAffineTransform(translationX: direction.xPosition(cell: cell), y: direction.yPosition(tableView: self))
            cell.layer.setAffineTransform(cellTransform)

            UIView.animate(withDuration: duration, delay: delay, usingSpringWithDamping: damping, initialSpringVelocity: 0.0, options: .curveEaseInOut, animations: {
                cell.layer.setAffineTransform(.identity)
            }, completion: { finished in
                completion?()
            })
        }
    }

    func animateTableViewWithFade(duration: TimeInterval, consecutively: Bool, completion: (() -> Void)? = nil) {
        if consecutively {
            for (index, cell) in self.visibleCells.enumerated() {
                let animationDelay: TimeInterval = duration/Double(visibleCells.count)*Double(index)
