I'm trying to get my UItextField to accept floating point but at the moment, it will only accept an integer. How can I get it to accept floating point in Swift?
class ViewController: UIViewController, UITextFieldDelegate {
@IBOutlet weak var Swallow13Button: UIButton!
@IBAction func Swallow13Button (sender: AnyObject) {
let a:Int? = data1.text.toInt()
if a > 13.13 {
self.DimensionLabel.text = "Fail Send DWG For Review"
self.view.endEditing(true)
}
else {
self.DimensionLabel.text = "Pass Send DWG for Review"
self.view.endEditing(true)
}
}