Skip to content

waterzhang0423/WTDrawing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WTDrawing

A simple way to draw smooth line on iOS.

Screenshot

Screenshot

Features

  • Change stroke color
  • Change stroke width
  • Undo
  • Clear all drawings
  • Eraser drawing
  • Get snapshot

Usage

Just dragging WTBezierPath and WTDrawingView into projects, then do what you want.

Init

self.drawingView = [[WTDrawingView alloc] initWithFrame:self.view.bounds];

Undo

[self.drawingView undo];

Clear all drawings

[self.drawingView clear];

Draw eraser

self.drawingView.eraserMode = YES;

Change stroke width

Default stroke width is 2.0.

self.drawingView.strokeWidth = 5.0;

Change stroke color

Default stroke color is black.

self.drawingView.strokeColor = [UIColor redColor];

Change eraser stroke width

Default eraser width is 20.

self.drawingView.eraserWidth = 20.0f;

About

A simple way to draw smooth line on iOS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors