What is the difference between closing the bezier path using closePath function and closing it manually?
I am trying to make a rectangle using UIBezierPath . I adopted two different ways to draw it. Also, I increased the stroke width to 25 px. First method : Using closePath UIBezierPath *bpath = [UIBezierPath bezierPath]; [bpath moveToPoint:CGPointMake(x, y)]; [bpath addLineToPoint:CGPointMake(x + w, y)]; [bpath addLineToPoint:CGPointMake(x + w, y + h)]; [bpath addLineToPoint:CGPointMake(x, y + h)]; [bpath closePath]; Output: Second method : Closing the path manually UIBezierPath *bpath = [UIBezierPath bezierPath]; [bpath moveToPoint:CGPointMake(x, y)]; [bpath addLineToPoint:CGPointMake(x + w, y)