UIBezierPath

class UIBezierPath : NSObject, NSCopying, NSSecureCoding
  • SwifterSwift: Initializes a UIBezierPath with a line from a CGPoint to another CGPoint.

    Declaration

    Swift

    convenience init(from: CGPoint, to otherPoint: CGPoint)

    Parameters

    from

    The point from which to path should start.

    to

    The point where the path should end.

  • SwifterSwift: Initializes a UIBezierPath connecting the given CGPoints with straight lines.

    Declaration

    Swift

    convenience init(points: [CGPoint])

    Parameters

    points

    The points of which the path should consist.

  • SwifterSwift: Initializes a polygonal UIBezierPath with the given CGPoints. At least 3 points must be given.

    Declaration

    Swift

    convenience init?(polygonWithPoints points: [CGPoint])

    Parameters

    points

    The points of the polygon which the path should form.

  • SwifterSwift: Initializes a UIBezierPath with an oval path of given size.

    Declaration

    Swift

    convenience init(ovalOf size: CGSize, centered: Bool)

    Parameters

    size

    The width and height of the oval.

    centered

    Whether the oval should be centered in its coordinate space.

  • SwifterSwift: Initializes a UIBezierPath with a rectangular path of given size.

    Declaration

    Swift

    convenience init(rectOf size: CGSize, centered: Bool)

    Parameters

    size

    The width and height of the rect.

    centered

    Whether the oval should be centered in its coordinate space.