iphone - Can I detect the delete key even if the UITextField is empty? -
when uitextfield contains nothing, pressing delete key of keyboard won't call of uitextfielddelegate's methods.
how can detect it?
edit: there seems no trivial way it. useful links can find are:
in short, solution put permanent space @ start of text field. , make other nesessary changes(textfieldshouldreturn:, textfield:shouldchangecharactersinrange:replacementstring:, etc.).
its possible put button on it, that's bit fragile since keyboard layout change different ios versions , there different keyboard layouts different languages.
look @ "managing text fields , text views" apple doc. im sure there way this. uitextfield implements protocol keyevents. 1 of key events delete key, override whatever method receives these , way.
Comments
Post a Comment