That Twitterriffic editor

Date Arrow  February 28, 2009

They say imitation is the best form of flattery. Well, here’s another attempt at doing that, after my “attack” on the Facebook iPhone app (decidedly I’m on a somewhat copying mood lately).

I use Twitterriffic a lot, both on the iPhone and on my Mac, and particularly in the iPhone version, I’ve always liked the little editor for tweets. It grows and shrinks as you type, it appears and disappears following the keyboard, and it provides a standard toolbar with many useful buttons (Actually, I wish the Mac version would have a similar text entry box, which would grow bigger as I type; it’s probably the only complaint I have about it!)

Well, here’s my own attempt at doing something similar, and after 1 hour of work, the result is published, ready for you to enjoy at Github. As usual, no strings attached, pure public domain stuff, so use it and play with it as you wish.

Similar Posts:

Tagged   Cocoa · Code · iPhone

5 Comments

  • #1.   Jack
    08.07.2009

    Hi,
    I have been reading posts on your blog for quite a while and have found your sample code to be really useful. I have implemented your twitterriffic editor into one of my projects, but am having a small issue that I don’t know if you can help with.
    Basically if I click the edit button, then click above the editing text field, the keypad disappears, but the toolbar/textfield remain floating. Do you know what the best way to fix this is?

  • #2.   Adrian
    08.07.2009

    Hi Jack,
    Thanks for your comments! I’ve just updated the Github code with a fix for your problem, thanks for spotting it! I’ve just used the “textViewDidEndEditing:” UITextView delegate method for solving the problem. Check out this commit in Github: http://url.akosma.com/teqaro
    Cheers

  • #3.   Jack
    08.07.2009

    Wow, amazingly fast response. Thanks a lot for this, I spent ages trying to figure out what method to use.
    I’ll write a post with some links to your site on my blob. Thanks

  • #4.   Jack
    08.07.2009

    Hi Adrian,

    Just added your changes and they worked great. I have found one more issue though, that I have managed to fix.
    Currently if you type more than 5 lines, the textfield will keep growing even beyond the bounds of the screen.
    by adding this:
    if(height > 105.0){
    height = 105.0;
    }
    into the “textViewDidChange:” method, the max height of the textfield sits just below the navigation bar.
    Anyway, thankyou so much for your code and keep up the great work

  • #5.   Adrian
    08.07.2009

    Thanks Jack :) I’ll add your code to the Github repository. All the best!

Commenting