     ///   - toCenter: The point you want to animate the view to
     ///   - options: Animation options like curveEaseIn
     ///   - isIn: Whether the animation is a in or out. Basically at end of animation should the view be hidden or displayed.
-    public func animate(for duration: TimeInterval, fromCenter: CGPoint, toCenter: CGPoint, options: UIViewAnimationOptions, isIn: Bool) {
+    public func animate(for duration: TimeInterval, fromCenter: CGPoint, toCenter: CGPoint, options: UIViewAnimationOptions, isIn: Bool, completion: ((Bool) -> Swift.Void)? = nil) {
         let originalCenter = self.center;
         self.center = fromCenter
         self.alpha = 1

        }
        
        // Animate the view.
        self.animate(for: duration, fromCenter: from, toCenter: to, options: animationOptions, isIn: isIn)
    }
}

//public class SimpleAnimation {
//    
//    /// Animates a view using center.
//    ///
//    /// - Parameters:
//    ///   - view: The view you would like to animate.
//    ///   - duration: The duration of the animation.
//    ///   - fromCenter: The point you want to animate the view from.
//    ///   - toCenter: The point you want to animate the view to
//    ///   - options: Animation options like curveEaseIn
//    ///   - isIn: Whether the animation is a in or out. Basically at end of animation should the view be hidden or displayed.
//    public static func animate(_ view: UIView, for duration: TimeInterval, fromCenter: CGPoint, toCenter: CGPoint, options: UIViewAnimationOptions, isIn: Bool) {
//        let originalCenter = view.center;
//        view.center = fromCenter
//        view.alpha = 1
//        
//        UIView.animate(withDuration: duration, delay: 0.0, options: options, animations: {
//            view.center = toCenter
//        }, completion: { (completed) in
//            view.isHidden = !isIn
//            view.center = originalCenter
//        })
//    }
//    
//}

        }, completion: { (completed) in
            self.isHidden = !isIn
            self.center = originalCenter
            completion?(completed)
        })
    }
    
    /// Performs a SimpleAnimation on a view with state, with a default duration of 0.7
    ///
    /// - Parameters:
    ///   - animation: The SimpleAnimation that should be performed on this view.
    ///   - state: The SimpleAnimationState of the SimpleAnimation either in or out.
    ///   - completion: A block called when animation is completed.
    public func perform(animation: SimpleAnimation, withState state: SimpleAnimationState, completion: ((Bool) -> Swift.Void)? = nil) {
        self.perform(animation: animation, forDuration: 0.7, withState: state, completion: completion)
    }
    
    
    /// Performs a SimpleAnimation on a view with state.
    ///
    /// - Parameters:
    ///   - animation: The SimpleAnimation that should be performed on this view.
    ///   - duration: The duration of the animation.
    ///   - state: The SimpleAnimationState of the SimpleAnimation either in or out.
    ///   - completion: A block called when animation is completed.
    public func perform(animation: SimpleAnimation, forDuration duration: Double, withState state: SimpleAnimationState, completion: ((Bool) -> Swift.Void)? = nil) {
        
        // Since we are animating this view make sure it
        // is NOT hidden, or user won't be able to view animation.
