Noor Syed
Noor Syed

Reputation: 630

Unnecessary line break in UITextView

I am programmatically writing to a UITextView a comma separated string. Example: NSString* str = @"cat,dog,big dog,kitten".

On [textView setText:str]; I get the results as: cat,dog,big
dog,kitten.

I don't understand why is the space getting converted to a line break. Any idea?

Upvotes: 3

Views: 759

Answers (1)

AlexWien
AlexWien

Reputation: 28727

the space gets converted to a line break, because the text did not fit into one line. This line break mode cannot be disabled, or changed. But you can rise the width of the textview.

Upvotes: 1

Related Questions