 		return btn
 	}
 
-	func buttonTapped(sender:UIButton) {
-		if let act = actions[sender] {
-			act()
+	func buttonTapped(btn:SCLButton) {
+		if btn.actionType == SCLActionType.Closure {
+			btn.action()
+		} else if btn.actionType == SCLActionType.Selector {
+			let ctrl = UIControl()
+			ctrl.sendAction(btn.selector, to:btn.target, forEvent:nil)
 		} else {
-			println("Could not find matching action for button")
-		}
+			println("Unknow action type for button")
+		}
+		hideView()
 	}
 	
 	// showSuccess(view, title, subTitle)

		}
		for btn in buttons {
			btn.backgroundColor = viewColor
		}
		
        // Adding duration

	var rootViewController:UIViewController!
    var durationTimer: NSTimer!
	private var inputs = [UITextField]()
	private var buttons = [SCLButton]()
	
    required init(coder aDecoder: NSCoder) {
        fatalError("NSCoding not supported")
