From 738b9a1536daee506c7da5b3a42b82d0affe7155 Mon Sep 17 00:00:00 2001 From: Horcrux Date: Fri, 20 Jan 2017 18:23:33 +0800 Subject: [PATCH] Update TSpan if content changes --- ios/Text/RNSVGTSpan.m | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ios/Text/RNSVGTSpan.m b/ios/Text/RNSVGTSpan.m index a6667b5e..9cdad432 100644 --- a/ios/Text/RNSVGTSpan.m +++ b/ios/Text/RNSVGTSpan.m @@ -18,6 +18,15 @@ CGPathRef _cache; } +- (void)setContent:(NSString *)content +{ + if (content == _content) { + return; + } + [self invalidate]; + _content = content; +} + - (void)renderLayerTo:(CGContextRef)context { if (self.content) {