how to add 2 textfields togethers as int (swift3)
I am trying to convert 2 textfields to ints and then add them together. I would also like to print the sum in the log. let jake = t3.text! + t4.text! Convert text into Int in Swift and an addition like we can do... //set before this condition Validation for Text field let sum = (Int(textFirst.text ?? "0")! + Int(textSecond.text ?? "0"))! print(sum) //Output here //MARK: - Text Field Delegate Method for Input validation func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { let allowedCharacters = CharacterSet.decimalDigits