Functions
The following functions are available globally.
-
Creates a UIBezierPath representing an arrow. Often the arrow connects two circles, and you may wish to avoid overlapping with those shapes. So, this method actually starts drawing a specified distance away from
fromand ends the arrow a specified distance before reachingto, as illustrated below:+ -------------------> + from toThe distance between
fromand the start of the arrow isfromRadius, and the distance between the end of the arrow andtoistoRadius. If both are 0, the arrow extends the full distance between the two points.Requires: fromRadius, toRadius, arrowHeadLength, arrowHeadWidth all >= 0
Declaration
Swift
public func pathForArrow(from: CGPoint, to: CGPoint, fromRadius: CGFloat = 0.0, toRadius: CGFloat = 0.0, arrowHeadLength : CGFloat = 6.0, arrowHeadWidth : CGFloat = 6.0) -> UIBezierPathParameters
fromwhere to start the arrow
towhere to end the arrow
fromRadiusthe distance between
fromand the start of the arrow.toRadiusthe distance between the end of the arrow and
to.arrowHeadLengthHow long the arrowhead is in points.
arrowHeadWidthHow wide the base of the arrowhead is in points.
Return Value
a path representing the arrow
Functions Reference