Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

[iOS] Fix richtext creating text view in sub thread. #2138

Merged
merged 1 commit into from
Feb 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ios/sdk/WeexSDK/Sources/Component/WXRichText.mm
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,9 @@ - (void)innerLayout
WXFloorPixelValue(sself.flexCssNode->getPaddingRight()+sself.flexCssNode->getBorderWidthRight())
};

WXRichTextView* view = [self textView];
NSMutableAttributedString* attrString = [sself buildAttributeString];
WXPerformBlockOnMainThread(^{
WXRichTextView* view = [sself textView];
view.attributedText = attrString;
view.textContainerInset = padding;
view.backgroundColor = [UIColor clearColor];
Expand Down