2010年1月8日 星期五

iPhone Coding Recipe: Live Character Counter, Word filter, and 1337 Translator For A UITextField | iCodeBlog

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 :)

Should able to use in user input functions

Posted via web from yinlin's posterous

沒有留言: