         alert.addTextFieldWithConfigurationHandler {
             (tf: UITextField) in
             tf.keyboardType = .NumberPad
+            tf.addTarget(self, action: #selector(AlertViewController.textChanged(_:)), forControlEvents: .EditingChanged)
         }
         
         alert.addAction(UIAlertAction(title: "OK", style: .Default, handler: { (act: UIAlertAction) in

        print("User tapped \(act.title)")
    }
    
    func handleNumber(act: UIAlertAction) {
        
    }
}

        }))
        
        alert.addAction(UIAlertAction(title: "Cancel", style: .Cancel, handler: nil))
        alert.actions[0].enabled = false
        self.presentViewController(alert, animated: true, completion: nil)
    }

