Posts tagged as: Editing Changed

iPhone Coding Snippet: Live Character Counter, Word filter, and 1337 Translator For A UITextField

  • Twitter
  • Facebook
  • Digg
  • Reddit
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
1337_Cereal_by_Alaskara

I’m sure you have seen a Twitter client such as Twittelator Pro or Tweetie 2 count down the characters as you type your Tweet.  This is done by responding to the Editing Changed action on a UITextField.

 

Today, I will show you how you can implement this functionality in your application as well as show you some other real world examples of responding to this action.  Here are a few of the uses that we will discuss:

  • Countdown of characters allowed – Used when the user is limited by a certain number of characters
  • Word filter – useful in filtering out swear words or other unwanted text
  • Live translator – our example will translate english to 1337 :)

I will create the core code and show you how to modify it slightly to implement the other 2 applications.

January 6th, 2010 Posted by: (ELC) - posted under:Snippets - View Comments READ MORE