ibireme 9 年之前
父节点
当前提交
3f1d97df3e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      YYText/Component/YYTextLayout.m

+ 1 - 1
YYText/Component/YYTextLayout.m

@@ -2663,7 +2663,7 @@ static void YYTextDrawBorder(YYTextLayout *layout, CGContextRef context, CGSize
             }
             }
             
             
             NSMutableArray *drawRects = [NSMutableArray new];
             NSMutableArray *drawRects = [NSMutableArray new];
-            CGRect curRect= ((NSValue *)runRects[0]).CGRectValue;
+            CGRect curRect= ((NSValue *)[runRects firstObject]).CGRectValue;
             for (NSInteger re = 0, reMax = runRects.count; re < reMax; re++) {
             for (NSInteger re = 0, reMax = runRects.count; re < reMax; re++) {
                 CGRect rect = ((NSValue *)runRects[re]).CGRectValue;
                 CGRect rect = ((NSValue *)runRects[re]).CGRectValue;
                 if (isVertical) {
                 if (isVertical) {