====
This library can draw on a canvas in iOS.
pod 'PEAR-Graphics-iOS'
#####□import
#import "PEARGraphics.h"
#####□create instance
PEARCanvas *_canvas = [[PEARCanvas alloc] initWithFrame:self.view.frame
onView:self.view
index:0];
#####□draw
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[_canvas setTouchPointWithTouches:touches];
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
[_canvas setMovePointWithTouches:touches];
[_canvas drawStart];
[_canvas setPencilWithShape:kCGLineCapRound
thickness:5.0 colorRed:0.0
colorGreen:0.0 colorBlue:0.0
alpha:1.0];
[_canvas draw];
[_canvas drawEnd];
}
#####□save
[_canvas save];
#####□fatch save List data
[_canvas fetchSaveData];
#####□fatch save image data
[_canvas fetchSaveDataAtIndex:0];
#####□redo
[_canvas redo];
#####□undo
[_canvas undo];