There is nothing wrong with your code there.
But one problem stands out - there is nothing to "fill" given that you only have a point to move to.
Setting lineWidth
would not help here because the path
of line only sees it as a line that is formed one a point to another, not taking account the width
of the UIBezierPath
.
If you would like to see that your code does in fact works, add this and see that it does:
UIBezierPath *linePath=[UIBezierPath bezierPath];
[linePath moveToPoint:self.lineStart];
[linePath addLineToPoint:self.lineEnd];
[linePath addLineToPoint:(CGPoint){250.0f, 350.0f}]; <<=== random points I chose.
[linePath setLineWidth:60.0];
Have fun. Hope this helps.
Addendum, if all you want is to show the line and a line only, please add the following:
line.strokeColor = [UIColor <YOUR_COLOR>].CGColor;
And you can then remove this I mentioned:
[linePath addLineToPoint:(CGPoint){250.0f, 350.0f}];