iPhone SMS application like text input view

Discussion in 'iOS Programming' started by Shrunga, Jan 13, 2009.

  1. macrumors newbie

    Aug 8, 2008
    Hello All,

    I need to implement a feature similar to the SMS text input view ie.. the UITextVIew that expands/Collapses along with the background image depending on the input text.

    I have done this with the following APIs in the textViewDidChange delegate method

    - (CGSize)sizeWithFont:(UIFont *)font constrainedToSize:(CGSize)size lineBreakMode:(UILineBreakMode)lineBreakMode;
    - (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight;

    But somehow the expansion of the textview and the image are not synchronous. The output looks very non-standard. Also its working is not as smooth as it is in the SMS application.
    Im not sure whether my whole approach is wrong

    Pointers,hints and views on this issue will be of immense help.

    Thanks and ton in advance

Share This Page