Procházet zdrojové kódy

bugfix: YYLabel setAttributedText: should call textParser to update

ibireme před 9 roky
rodič
revize
2480bd5d35
1 změnil soubory, kde provedl 1 přidání a 4 odebrání
  1. 1 4
      YYText/YYLabel.m

+ 1 - 4
YYText/YYLabel.m

@@ -719,13 +719,10 @@ static dispatch_queue_t YYLabelGetReleaseQueue() {
             } break;
             default: break;
         }
-
-        if (_textParser)
-            [_textParser parseText:_innerText selectedRange:NULL];
-        
     } else {
         _innerText = [NSMutableAttributedString new];
     }
+    [_textParser parseText:_innerText selectedRange:NULL];
     if (!_ignoreCommonProperties) {
         if (_displaysAsynchronously && _clearContentsBeforeAsynchronouslyDisplay) {
             [self _clearContents];