Reputation: 143
I have a little TextView with a single line. When the line is full of text, I want this TextView start scrolling horizontally not vertically.
To make a picture of this, it's like in the Apple's mail app when you fill the "To :" field.
I've tried different way but no one worked :/
CGSize size = textView.contentSize;
size.height = CGRectGetHeight(textView.frame);
size.width = 300;
textView.contentSize = size;
textView.alwaysBounceVertical = NO;
Any help would be greatly appreciate, cheers
Upvotes: 1
Views: 1346
Reputation: 881
It seems you are looking for a UITextField
which behaves exactly like you described.
Upvotes: 4