---
title: close()
framework: uikit
role: symbol
role_heading: Instance Method
path: uikit/uibezierpath/close()
---

# close()

Closes the most recent subpath.

## Declaration

```swift
func close()
```

## Discussion

Discussion This method closes the current subpath by creating a line segment between the first and last points in the subpath. This method subsequently updates the current point to the end of the newly created line segment, which is also the first point in the now closed subpath.

## See Also

### Constructing a path

- [move(to:)](uikit/uibezierpath/move(to:).md)
- [addLine(to:)](uikit/uibezierpath/addline(to:).md)
- [addArc(withCenter:radius:startAngle:endAngle:clockwise:)](uikit/uibezierpath/addarc(withcenter:radius:startangle:endangle:clockwise:).md)
- [addCurve(to:controlPoint1:controlPoint2:)](uikit/uibezierpath/addcurve(to:controlpoint1:controlpoint2:).md)
- [addQuadCurve(to:controlPoint:)](uikit/uibezierpath/addquadcurve(to:controlpoint:).md)
- [removeAllPoints()](uikit/uibezierpath/removeallpoints().md)
- [append(_:)](uikit/uibezierpath/append(_:).md)
- [cgPath](uikit/uibezierpath/cgpath.md)
- [currentPoint](uikit/uibezierpath/currentpoint.md)
