• 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: UITextView symbols
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UITextView symbols


  • Subject: Re: UITextView symbols
  • From: Andrew Farmer <email@hidden>
  • Date: Sun, 28 Jun 2009 19:23:13 -0700

On 27 Jun 2009, at 16:26, DKJ wrote:
I'm using this method:

textView:shouldChangeTextInRange:replacementText:

to let users put special symbols into a UITextView.

I detect the Return key by checking whether the input string is equal to @"\n". But how would I detect the back-delete key? @"\b" doesn't do it. And I can't seem to find any docs that list these codes.

I haven't done any iPhone development myself, but I'd imagine that your problem is that you're looking for the wrong sort of change. Pressing Return inserts a newline, but pressing backspace doesn't insert a backspace. It removes a character. At a blind guess, maybe it'll show up as a range of length 1 being replaced with @""?
_______________________________________________


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


References: 
 >UITextView symbols (From: DKJ <email@hidden>)

  • Prev by Date: Re: UITableViewCells
  • Next by Date: Re: GC pros and cons
  • Previous by thread: Re: UITextView symbols
  • Next by thread: Base SDK and deployment target Q
  • Index(es):
    • Date
    • Thread