Skip to content

Commit

Permalink
Merge pull request #10 from dehli/development
Browse files Browse the repository at this point in the history
Version 1.3.0
  • Loading branch information
dehli authored Sep 2, 2016
2 parents c9c1828 + 8519651 commit 7f9246f
Show file tree
Hide file tree
Showing 4 changed files with 154 additions and 122 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ If programmatically adding the view, you can use the `init(frame: CGRect)` metho

#### Customizing

The first step when customizing the `TouchDrawView` is setting its `delegate`. The container must conform to `TouchDrawViewDelegate`, which has the following functions:
When customizing the `TouchDrawView` you can setting its `delegate`. The container can conform to parts of `TouchDrawViewDelegate`, which has the following functions:

```
func undoEnabled() -> Void {
Expand Down Expand Up @@ -79,11 +79,21 @@ func clearDisabled() -> Void {
The `TouchDrawView` exposes the following methods:

- `exportDrawing() -> UIImage`
- Exports a UIImage version of the drawing.
- `clearDrawing()`
- Clears the TouchDrawView.
- `undo()`
- Undo the last stroke.
- `redo()`
- Redo what was undone.
- `setColor(color: UIColor)`
- Sets the color of future strokes.
- `setWidth(width: CGFloat)`
- Sets the width of future strokes.
- `importStack(stack: [Stroke])`
- Set the `TouchDrawView` to have certain strokes (usually will be used in conjunction with `exportStack()`.
- `exportStack() -> [Stroke]`
- Exports the strokes from a `TouchDrawView` so they can be imported later.

## Demo

Expand Down
Loading

0 comments on commit 7f9246f

Please sign in to comment.