-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
添加自定义视图,再输入文本会有视图重复问题 #6
Comments
没看懂 能否提供demo |
刚看到,等我弄个 demo 传上来 |
你在另一个 issues 修改了这个问题,但我测试,又出现另外一个问题,就是一次性添加多张大图的时候,永远也滚动不到底部 |
复现的步骤是插入完多张图片后保存这条复文本,然后再次编辑,主动调用 textView.becomeResponder() |
希望能提供一个复现的demo |
暂时没办法弄 demo, 数据保存比较麻烦, 图片会重叠的问题,我试着加了一段代码 - (void)setContentSize:(CGSize)contentSize {
if (!CGSizeEqualToSize(self.contentSize, contentSize)) {
[self.textRender.textStorage enumerateAttribute:NSAttachmentAttributeName inRange:NSMakeRange(0, self.textRender.textStorage.length) options:0 usingBlock:^(id _Nullable value, NSRange range, BOOL * _Nonnull stop) {
if ([value isKindOfClass:[TYTextAttachment class]]) {
[self.textRender.layoutManager invalidateDisplayForCharacterRange:range];
}
}];
}
[super setContentSize:contentSize];
} 应该是解决了。 |
iOS 10 系统上图片会重叠的概率非常大 |
@12207480 大佬,还是同样的问题,使用中还是容易出现附件重叠 |
加我 qq 122074809 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
用的是 attachment.view 添加的自定义 UIImageView
会有视图重复添加的 bug ,可以帮助我解决吗
The text was updated successfully, but these errors were encountered: