2009-05-19 79 views

回答

1

每次当您添加文本时检查内容大小

UITextView *textView; 
    if(textView.contentSize.height > textView.frame.size.height) 
    { 
     //your text is lager then view 
    } 
+0

这工作得很好,第一次的内容高度超过帧。之后,条件保持真实,每个字符添加到该行,文本视图将保持滚动。我正在寻找的是仅当添加的文本不在视图中时才通过测试用例。 ((textView.contentOffset.y + textView.frame.size.height) Boon 2009-05-19 17:02:58

相关问题