View Full Version : Going to the next line after an input instead of refreshing
gryym
Jul 21, 2008, 11:54 PM
Hi,
I am stumped about how to make texts that's derived from an input like a UITextField, onto a textView and make it such that after each input, the previous sentences are not erased. What I am looking for is instead of updating or refreshing the outputs, they are instead 'pushed' onto the next line.
Currently I am using UITextView as the output for the texts as it is scrollable.
Thanks in advance!
Enuratique
Jul 22, 2008, 01:32 AM
Hi,
I am stumped about how to make texts that's derived from an input like a UITextField, onto a textView and make it such that after each input, the previous sentences are not erased. What I am looking for is instead of updating or refreshing the outputs, they are instead 'pushed' onto the next line.
Currently I am using UITextView as the output for the texts as it is scrollable.
Thanks in advance!
Just a guess but try something like:
myTextView.text = [myTextView.text stringByAppendingString: myTextField.text];
That will put the most recent input at the end of your text view, it you want it to be at the beginning, you'd do:
myTextView.text = [myTextField.text stringByAppendingString: myTextView.text];
gryym
Jul 22, 2008, 02:41 AM
Just a guess but try something like:
myTextView.text = [myTextView.text stringByAppendingString: myTextField.text];
That will put the most recent input at the end of your text view, it you want it to be at the beginning, you'd do:
myTextView.text = [myTextField.text stringByAppendingString: myTextView.text];
Dude, you really helped me a bunch! That line of code was basically what i needed. Thanks a lot bro. :)
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.