Skip to main content

Posts

Showing posts with the label catiledlayer

Intermittent EXC_BAD_ACCESS exception with CATitledLayer

I am having some problems with an app that keeps crashing intermittently. Code below is in a UIView with CATiledLayer as its backing layer: - (UIBezierPath *)path { if(_path == nil){ _path = [UIBezierPath bezierPath]; CGFloat lineWidth = 5; [_path setLineWidth:lineWidth]; [_path setLineJoinStyle:kCGLineJoinRound]; [_path setLineCapStyle:kCGLineCapRound]; [_path moveToPoint:CGPointMake(100, 100)]; [_path addLineToPoint:CGPointMake(200,200)]; [_path addLineToPoint:CGPointMake(150,200)]; [_path addLineToPoint:CGPointMake(50,400)]; _path closePath]; return _path; } return _path; } - (void)drawRect:(CGRect)rect { [[UIColor colorWithRed:0.1 green:0.1 blue:1 alpha:0.45] setStroke];//sets stroke color in current context [self.path stroke]; } I get the following error code: Single stepping until exit from function _ZN2CG4Path15apply_transformERK17CGAffineTransform, which ha