UITextView自动向下滚动 [英] UITextView automatic scroll down

查看:125
本文介绍了UITextView自动向下滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个uiview和我添加一个可编辑的UITextView到它

  UITextView * textView = [[UITextView alloc] initWithFrame: CGRectMake(5,5,219,47)]; 
[self addSubview:textView];
textView.font = [UIFont systemFontOfSize:14];

当我类型不自动下降。任何人都有想法?

解决方案

如果找到解决方案



i将textview放入一个视图,并将视图设置为clipToBounds = YES
然后我把textView的高度70



修复了问题。 p>

很奇怪的解决方案,但它终于工作了:)


i have an uiview and i add a editable UITextView to it

UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(5, 5, 219, 47)];
[self addSubview:textView];
textView.font = [UIFont systemFontOfSize:14];

when i type it doesn't go down automatic. anybody got an idea?

解决方案

if found a solution

i put the textview into a view and set the view to clipToBounds = YES then i put the textView to a height of 70

that fixed the problem.

very strange solution, but it finally works :)

这篇关于UITextView自动向下滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆