Skip to content

Subclass of UIImageview that supports drawing and creation of SVG image files of the drawing

Notifications You must be signed in to change notification settings

maneesh87/DrawSVG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DrawSVG

Custom UIImageview which supports drawing and creation of SVG image files. Ideal for creating and storing signatures in SVG format.

Getting Started

Download and Drop SVGDrawingView.h and SVGDrawingView.m in your project. SVGDrawingView can be directly added as a view to storyboard or added as subview.

Setup

// Set Color:
drawingView.strokeColor = [UIColor darkGrayColor];

// Set Width:
drawingView.strokeWidth = 10.0;

Save SVG file to document directory:

NSString *path = [NSHomeDirectory() stringByAppendingPathComponent: @"Documents/Sign.svg"];
NSError *e;
[drawingView saveSVGFileToPath:path error:&e];

Get SVG file as string:

[drawingView getSVGString];

Reset View:

[drawingView clearView];

For more details check the xcode project.

About

Subclass of UIImageview that supports drawing and creation of SVG image files of the drawing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published