2

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?

Kara
  • 6,115
  • 16
  • 50
  • 57
spd
  • 2,114
  • 1
  • 29
  • 54

2 Answers2

8

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

Jason Plank
  • 2,336
  • 5
  • 31
  • 40
spd
  • 2,114
  • 1
  • 29
  • 54
0

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

Igor Kulagin
  • 1,701
  • 15
  • 20