UITextView加载html文本显示一半问题

iOS 真机12.4.1的系统上需要设置这一项 

textView.layoutManager.allowsNonContiguousLayout = NO;

其实和覆写父类这俩方法也有关系,如果不覆写也不会出现显示一半的问题

- (void)setSelectedRange:(NSRange)selectedRange {
    
}

- (UITextRange *)selectedTextRange {
    return nil;
}

猜你喜欢

转载自blog.csdn.net/allanGold/article/details/114164994