     func buttonTapped(btn:UNAlertButton) {
         
         btn.action()
+        if (autoDismiss) {
+            dismiss()
+        }
+    }
+    
+    func dismissAlert() {
         dismiss()
+    }
+    func setAutoDismiss(autoStatus: Bool) {
+        autoDismiss = autoStatus
     }
     
     private func getBottomPos(view: UIView) -> CGFloat {

        )
        
    }
    
    // Dismiss the alertview from the keywindow
    private func dismiss() {

private let kUNAlertViewTag          = 1928
private let kCornerRadius: CGFloat   = 6.0
private let kShadowOpacity: Float    = 0.15
private var autoDismiss: Bool        = true
internal enum UNButtonAlignment {
    case Horizontal
    case Vertical
