Re: Substituting characters in a UITextField
Re: Substituting characters in a UITextField
- Subject: Re: Substituting characters in a UITextField
- From: Steve Fogel <email@hidden>
- Date: Fri, 26 Jun 2009 00:58:57 -0700
Hi...
textField:shouldChangeCharactersInRange:replacementString just tells
you what the most recent character is that got typed (if range == 0)
or got backspaced over (if range == 1).
You have to use other methods to actually change the contents of the
text field. You manipulate the text field's text property directly
with methods like replaceOccurrencesOfString:withString: or
insertString:atIndex: or deleteCharactersInRange:, and so on. See the
NSString instance methods for all the goodies available.
HTH
Steve
Crescent Computing
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden