ibireme 9 lat temu
rodzic
commit
0b299b8b85
2 zmienionych plików z 3 dodań i 3 usunięć
  1. 1 1
      YYText/YYLabel.m
  2. 2 2
      YYText/YYTextView.m

+ 1 - 1
YYText/YYLabel.m

@@ -1215,8 +1215,8 @@ static dispatch_queue_t YYLabelGetReleaseQueue() {
         } else {
             font = [UIFont fontWithName:fontName size:font.pointSize];
         }
-        if (font) self.font = font;
     }
+    if (font) self.font = font;
 }
 
 - (void)setFontSize_:(CGFloat)fontSize {

+ 2 - 2
YYText/YYTextView.m

@@ -3719,8 +3719,8 @@ typedef NS_ENUM(NSUInteger, YYTextMoveDirection) {
         } else {
             font = [UIFont fontWithName:fontName size:font.pointSize];
         }
-        if (font) self.font = font;
     }
+    if (font) self.font = font;
 }
 
 - (void)setFontSize_:(CGFloat)fontSize {
@@ -3759,8 +3759,8 @@ typedef NS_ENUM(NSUInteger, YYTextMoveDirection) {
         } else {
             font = [UIFont fontWithName:fontName size:font.pointSize];
         }
-        if (font) self.placeholderFont = font;
     }
+    if (font) self.placeholderFont = font;
 }
 
 - (void)setPlaceholderFontSize_:(CGFloat)fontSize {