Sunday, December 1, 2013

UITextView how to append text?

[color = # FF0000] UITextView.text = @ "";

The above method can only be set once the value of the country, before it was cleared.

There is no additional text methods?
[/ color]
Reply:
UITextView.text = @ "";

The above method can only be set once the value of the country, before it was cleared.

There is no additional text methods?

Reply:
NSString * tex = UITextView.text;

tex = [tex stringByAppendingString: @ "aaaa"];

or

tex = [tex stringByAppendingFormat: @ "% d", i];


UITextView.text = tex;
Reply:
Upstairs said it right. . . .
Reply:
You save the original string, how to deal with love on how to deal with it how you like how the. . . . . .
Reply:
reference to the second floor of the reply:
NSString * tex = UITextView.text;

tex = [tex stringByAppendingString: @ "aaaa"];

or

tex = [tex stringByAppendingFormat: @ "% d", i];


UITextView.text = tex;


Learning.
Reply:
UITextView * textView = [[UITextView alloc] init];
NSString * str = textView.text;
textView.text = [str stringByAppendingString: @ "sssssss"];

No comments:

Post a Comment