UITextView 追加文字自动跳到顶部解决方法

来源:互联网 发布:类似faceu的软件 编辑:程序博客网 时间:2024/05/22 15:04

textView.layoutManager.allowsNonContiguousLayout = NO;


CGPoint pt = [textViewcaretRectForPosition:self.textView.selectedTextRange.start].origin;

    [textViewsetContentSize:CGSizeMake(0, pt.y +textView.font.pointSize)];


0 0