                 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?()
+            }
         }
     }
 


public extension UITableView {

    public func animateRows(animation: TableViewAnimation) {
        switch animation {

        case .left(let duration, let staggered):
            self.animateTableViewWithDirection(duration: duration, direction: .left, staggered: staggered, strongDamping: false)

        case .right(let duration, let staggered):
            self.animateTableViewWithDirection(duration: duration, direction: .right, staggered: staggered, strongDamping: false)

        case .top(let duration):
            self.animateTableViewWithDirection(duration: duration, direction: .top, staggered: false, strongDamping: true)

        case .bottom(let duration):
            self.animateTableViewWithDirection(duration: duration, direction: .bottom, staggered: false, strongDamping: false)

        case .fade(let duration, let consecutively):
            self.animateTableViewWithFade(duration: duration, consecutively: consecutively)

        case .custom(let duration, let startingTransform, let staggered):
            self.animateTableViewWithTransform(duration: duration, transform: startingTransform, staggered: staggered)

        }
    }

    public func reloadTableViewWithFadeAnimation(duration: TimeInterval = 0.3) {
        self.reloadData()

        self.animateTableViewWithFade(duration: duration, consecutively: false)
    }

    public func reloadTableViewSmoothly() {


fileprivate extension UITableView {

    func animateTableViewWithTransform(duration: TimeInterval, transform: CGAffineTransform, staggered: 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
