• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Substituting characters in a UITextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Substituting characters in a UITextField
      • From: DKJ <email@hidden>
  • Prev by Date: Re: GC pros and cons
  • Next by Date: Re: NSArrayController "Auto Rearrange Content" causes "Cannot remove an observer for key path" error
  • Previous by thread: Re: Substituting characters in a UITextField
  • Next by thread: Re: Substituting characters in a UITextField
  • Index(es):
    • Date
    • Thread