开发者

UITextView - set width - allow scrolling up and down - wrap text to width

Basically I want to have a UITextView - I want it to scroll up and down (ie: I set a height and width, and if the text overflows this then the c开发者_C百科ontentSize is bigger than the frame).

But, I don't want it to get wider. At the moment its scrolling left-to-right. All I want is for it to scroll up and down.

Any ideas?

Thanks Tom


Since UITextField inherits from UIScrollView, you should be able to do something like this:

myTextField.contentSize = CGSizeMake(320,500);

This will prevent side scrolling.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜