If you set the layer fillColor value other than nil or transparent, the layer will fill its path.
If you set the lineWidth layer lineWidth number greater than zero, and you set its strokeColor to something other than nil or transparent, the layer will stroke its path.
If you set all these properties, the layer will fill and stroke its path. It draws a stroke after filling.
The layer path must actually enclose some area so that it can fill something. In your message, you set the path as follows:
UIBezierPath* path = [UIBezierPath bezierPath]; [path moveToPoint:self.lineStart]; [path addLineToPoint:self.lineEnd]; self.lineShape.path = path.CGPath;
This path contains one line segment. It does not cover any area, so nothing is filled on the layer.
source share