131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
# File 'lib/formotion/patch/ui_text_field.rb', line 131
def textField(theTextField, shouldChangeCharactersInRange:range, replacementString:string)
if self.shouldChangeCharactersInRange_callback
return self.shouldChangeCharactersInRange_callback.call(theTextField, range, string)
end
if BW::Device.ios_version >= "7.0"
if range.location == theTextField.text.length && string == " "
theTextField.text = theTextField.text.stringByAppendingString("\u00a0")
return false
end
end
true
end
|