开发者

How to get bounds of UIBezierPath excluding control points

开发者 https://www.devze.com 2023-02-02 13:01 出处:网络
NSBezierPath provides an API called bounds that returns bounds without control points. Is there any开发者_JAVA百科 equivalent API in UIBezierPath to return the path bounds excluding control points?I g

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


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消