A simple line over a scrollview :
UIBezierPath *path = [UIBezierPath bezierPath];
[path moveToPoint:CGPointMake(1382.0, 144.0)];
[path addLineToPoint:CGPointMake(1655.0, 152.0)];
path.lineWidth = 2;
[path fill];
gives many of these :
CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
for:
CGContextSaveGState ,CGContextSetFlatness,CGContextAddPath,CGContextDrawPath
What is wrong with me ?
EDIT: This also gives a crash:
UIBezierPath *path = [UIBezierPath bezierPath];
[path moveToPoint:CGPointMake(1382.0, 144.0)];
[path addLineToPoint:CGPointMake(1655.0, 152.0)];
path.lineWidth = 2;
CAShapeLayer *myLayer = (CAShapeLayer*) self.scroller.layer;
UIBezierPath *testPath = [UIBezierPath bezierPathWithRect:self.view.bounds];
[testPath appendPath:path];
myLayer.path = testPath.CGPath;
myLayer.fillColor = [UIColor blackColor].CGColor;
[self.scroller.layer addSublayer:myLayer];
[CALayer setPath:]: unrecognized selector sent to instance