ibireme 9 년 전
부모
커밋
0b299b8b85
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  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 {