CocoaPods trunk is moving to be read-only. Read more on the blog, there are 14 months to go.
| TestsTested | ✗ |
| LangLanguage | Obj-CObjective C |
| License | MIT |
| ReleasedLast Release | Dec 2015 |
Maintained by Hiroki Umatani.
| Depends on: | |
| PEAR-FileManager-iOS | >= 0 |
| PEAR-DataConvertor-iOS | >= 0 |
This library can draw on a canvas in iOS.
pod 'PEAR-Graphics-iOS'
#import "PEARGraphics.h"PEARCanvas *_canvas = [[PEARCanvas alloc] initWithFrame:self.view.frame
onView:self.view
index:0];
- (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];
}
[_canvas save];
[_canvas fetchSaveData];
[_canvas fetchSaveDataAtIndex:0];
[_canvas redo];
[_canvas undo];