iPhone UITextView 在底部留下 2 行的空间 [英] iPhone UITextView leaves room for 2 lines at the bottom
问题描述
当我开始在视图控制器的默认 textView 中输入文本时,它不会到达文本字段的底部.它为另外 2 行文本留出空间,然后开始滚动.我希望它在我开始超出最后一行时开始滚动.
When I start typing text in a default textView in my viewcontroller, it's not going to the bottom of the textfield. It leaves room for 2 more lines of text and then starts scrolling. I want it to start scrolling when I start going beyond the last line.
我尝试了所有方法,但不知道我能做什么?有人有什么想法吗?
I tried everything, and I don't know what I can do? Anyone any ideas?
推荐答案
由于 UITextView 是 UIScrollView 的子类,请查看 UIScrollVIew 的属性,如 contentInset 等,看看它们是否可能在您的框架/边界和里面的内容.
as UITextView is a subclass of UIScrollView, look at UIScrollVIew's properties, like contentInset and others to see if they might be creating a gap between your frame/bounds and the content inside.
这篇关于iPhone UITextView 在底部留下 2 行的空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!