Can't append space at end of UITextView

Posted by Sam V on Stack Overflow See other posts from Stack Overflow or by Sam V
Published on 2010-05-28T05:11:01Z Indexed on 2010/05/30 4:32 UTC
Read the original article Hit count: 332

Filed under:
|
|

I have a UITextView in which I want the initial value to be "@username " (notice the space after the username). This way the user can start typing right away without having to tap space. So I do:

textView.text = [NSString stringWithFormat:@"@%@ ", username];

But it seems like it's impossible to have the UITextView text property ending with a space (it always gets stripped out). Am I correct? Is there any workaround for this?

I tried using the \s char and no success.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about string