Raphael Lim Raphael Lim - 2 months ago 5x
Objective-C Question

Repeating my text on my textView Objective C

How do I make the following script repeat the text input into it?

self.textView.text = self.userTextInput

The above script was written as a text input from a
but I want it to loop 10 times in its text viewer, how do I write that?



Use following code to get your desired result.

NSMutableString *teststring = [NSMutableString string];
for(int i = 0; i<10;i++)
[teststring appendString:self.userTextInput];
self.textView.text = teststring;