ibireme 9 жил өмнө
parent
commit
5a2557435c

+ 2 - 0
YYText/Component/YYTextLayout.m

@@ -2276,6 +2276,8 @@ static void YYTextSetLinePatternInContext(YYTextLineStyle style, CGFloat width,
 
 
 static void YYTextDrawBorderRects(CGContextRef context, CGSize size, YYTextBorder *border, NSArray *rects, BOOL isVertical) {
+    if (rects.count == 0) return;
+    
     YYTextShadow *shadow = border.shadow;
     if (shadow.color) {
         CGContextSaveGState(context);