             rightMarginConstraint?.constant = -rightMargin + superViewWidth
             bottomMarginConstraint?.constant = -bottomMargin
             self.layoutIfNeeded()
+        case .SlideFromTopBackToTop, .SlideFromTopToBottom:
+            bottomMarginConstraint?.active = false
+            topMarginConstraint?.active = true
+            topMarginConstraint?.constant = -height
+            self.layoutIfNeeded()
         }
 
         // Final state
         bottomMarginConstraint?.constant = -bottomMargin
+        topMarginConstraint?.constant = topMargin
         leftMarginConstraint?.constant = leftMargin
         rightMarginConstraint?.constant = -rightMargin
 

        }
    }

    /// Bottom margin. Default is 4
    public dynamic var bottomMargin: CGFloat = 4 {
        didSet {
            bottomMarginConstraint?.constant = -bottomMargin
            self.layoutIfNeeded()
        }
    }

    case SlideFromBottomBackToBottom
    case SlideFromLeftToRight
    case SlideFromRightToLeft
    case SlideFromTopToBottom
    case SlideFromTopBackToTop
}

public class TTGSnackbar: UIView {
