      - fromScale: starting scale for the view, should be between 0 and 1
      - duration: duration of the animation, in seconds
      - delay: delay before the animation starts, in seconds
+     - completion: block executed when the animation ends
    */
   func popIn(fromScale: CGFloat = 0.5,
              duration: NSTimeInterval = 0.5,
-             delay: NSTimeInterval = 0) -> UIView {
+             delay: NSTimeInterval = 0,
+             completion: ((Bool) -> Void)? = nil) -> UIView {
     hidden = false
     alpha = 0
     transform = CGAffineTransformMakeScale(fromScale, fromScale)

     - y: vertical offset that should be used for the ending point of the animation
     - duration: duration of the animation, in seconds
     - delay: delay before the animation starts, in seconds
   */
  func slideOut(to edge: SimpleAnimationEdge = .None,
                   x: CGFloat = 0,
                   y: CGFloat = 0,
                   duration: NSTimeInterval = 0.25,
                   delay: NSTimeInterval = 0) -> UIView {
    let offset = offsetForEdge(edge)
    let endTransform = CGAffineTransformMakeTranslation(offset.x + x, offset.y + y)
    UIView.animateWithDuration(
      duration, delay: delay, options: .CurveEaseOut, animations: {
        self.transform = endTransform
      }, completion: nil)
    return self
  }


     - y: vertical offset that should be used for the starting point of the animation
     - duration: duration of the animation, in seconds
     - delay: delay before the animation starts, in seconds
     - completion: block executed when the animation ends
   */
  func slideIn(from edge: SimpleAnimationEdge = .None,
                    x: CGFloat = 0,
                    y: CGFloat = 0,
                    duration: NSTimeInterval = 0.4,
                    delay: NSTimeInterval = 0,
                    completion: ((Bool) -> Void)? = nil) -> UIView {
    let offset = offsetForEdge(edge)
    transform = CGAffineTransformMakeTranslation(offset.x + x, offset.y + y)
    hidden = false
