spd
spd

Reputation: 2134

How to get bounds of UIBezierPath excluding control points

NSBezierPath provides an API called bounds that returns bounds without control points. Is there any equivalent API in UIBezierPath to return the path bounds excluding control points?

Upvotes: 2

Views: 1888

Answers (2)

Igor Kulagin
Igor Kulagin

Reputation: 1771

UIBezierPath has bounds property. https://developer.apple.com/reference/uikit/uibezierpath/1624350-bounds

Upvotes: 0

spd
spd

Reputation: 2134

I got the solution, which was simple. CGPath provides such a call: CGPathGetPathBoundingBox. We can always get CGPath from UIBezierPath.

Upvotes: 8

Related Questions