美文网首页Core Animation
iOS CoreAnimation教程 第四篇

iOS CoreAnimation教程 第四篇

作者: 人魔七七 | 来源:发表于2018-03-07 16:43 被阅读32次

CoreAnimation lineCap 属性效果直接看效果图

CAShapeLayer * path2 = [CAShapeLayer layer];
    path2.frame       = CGRectMake(93.5, 331.5, 186.06, 73);
    path2.lineCap     = kCALineCapSquare;
    path2.fillColor   = nil;
    path2.strokeColor = [UIColor blackColor].CGColor;
    path2.lineWidth   = 12;
    path2.path        = [self path2Path].CGPath;
    CAShapeLayer * path2 = [CAShapeLayer layer];
    path2.frame       = CGRectMake(93.5, 331.5, 186.06, 73);
    path2.lineCap     = kCALineCapRound;
    path2.fillColor   = nil;
    path2.strokeColor = [UIColor blackColor].CGColor;
    path2.lineWidth   = 12;
    path2.path        = [self path2Path].CGPath;
CAShapeLayer * path2 = [CAShapeLayer layer];
    path2.frame       = CGRectMake(93.5, 331.5, 186.06, 73);
    path2.lineCap     = kCALineCapButt;
    path2.fillColor   = nil;
    path2.strokeColor = [UIColor blackColor].CGColor;
    path2.lineWidth   = 12;
    path2.path        = [self path2Path].CGPath;

相关文章

网友评论

    本文标题:iOS CoreAnimation教程 第四篇

    本文链接:https://www.haomeiwen.com/subject/hgzjfftx.html