BTUIKVectorArtView

Objective-C

@interface BTUIKVectorArtView : UIView

Swift

class BTUIKVectorArtView : UIView

Subclassed to easily draw vector art into a scaled UIView. Useful for using generated UIBezierPath code from PaintCode verbatim.

  • Subclass and implement this method to draw within a context pre-scaled to the view’s size.

    Declaration

    Objective-C

    - (void)drawArt;

    Swift

    func drawArt()
  • This property informs the BTVectorArtView drawRect method of the dimensions of the artwork.

    Declaration

    Objective-C

    @property (nonatomic) CGSize artDimensions;

    Swift

    var artDimensions: CGSize { get set }
  • Returns a UIImage of the artwork

    Declaration

    Objective-C

    - (UIImage *)imageOfSize:(CGSize)size;

    Swift

    func image(of size: CGSize) -> UIImage!

    Parameters

    size

    the size of the desired UIImage

    Return Value

    A UIImage of of the artwork