In my iPad app, I noticed different behavior between iOS 6 and iOS 7 with UITextFields.
I create the UITextField as follows:
UIButton *theButton = (U
Transformed triazotan's answer into Swift3.
func textField(textField: UITextField, shouldChangeCharactersInRange range: NSRange, replacementString string: String) -> Bool{
if (range.location == textField.text?.characters.count && string == " ") {
let noBreakSpace: Character = "\u{00a0}"
textField.text = textField.text?.append(noBreakSpace)
return false
}
return true
}