一些记录

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

    CGPoint shapePosition = CGPointMake(0,0);

    CAShapeLayer *circleShape = [CAShapeLayer layer];

    circleShape.path = path.CGPath;

    circleShape.position = shapePosition;

    circleShape.fillColor = [UIColor clearColor].CGColor;

//    circleShape.opacity = 0;

    circleShape.strokeColor =

    [UIColor redColor].CGColor;

    circleShape.lineWidth = 1;

    [self.view.layer addSublayer:circleShape];

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

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

lineCap起点形状

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

  NSArray *arr = [[NSArray alloc] initWithObjects:[NSNumber numberWithInt:10],[NSNumber numberWithInt:10], nil];

lineDashPattern = arr;


你可能感兴趣的:(一些记录)