一些记录

来源:互联网 发布:瑞斯康微电子知乎 编辑:程序博客网 时间:2024/04/30 15:05

1. UIBezierPath *path = [UIBezierPathbezierPathWithRoundedRect:pathFrame cornerRadius:0];

    CGPoint shapePosition = CGPointMake(0,0);

    CAShapeLayer *circleShape = [CAShapeLayerlayer];

    circleShape.path = path.CGPath;

    circleShape.position = shapePosition;

    circleShape.fillColor = [UIColorclearColor].CGColor;

//    circleShape.opacity = 0;

    circleShape.strokeColor =

    [UIColor redColor].CGColor;

    circleShape.lineWidth = 1;

    [self.view.layeraddSublayer:circleShape];

1.position 位置和origel一致因为frame的宽长为0

2.其他情况position和anchorPoint 为一个点,

lineCap起点形状

3.lineDashPhase = 9 第一个折线的长度 10-9

  NSArray *arr = [[NSArrayalloc] initWithObjects:[NSNumbernumberWithInt:10],[NSNumbernumberWithInt:10],nil];

lineDashPattern = arr;


0 0
原创粉丝点击