Skip to content

Commit

Permalink
Added LICENSE
Browse files Browse the repository at this point in the history
Updated README.md
  • Loading branch information
dblapps committed Jun 2, 2013
1 parent cbdee26 commit 79f02fe
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 1 deletion.
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2013 Double Apps Inc. (http://www.double-apps.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

54 changes: 53 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,54 @@
DAScratchPad
============
=======================

#### Author

David B. Levi (https://github.com/dblapps)


#### Overview

DAScratchPad is a small UIView subclass that provides a simple drawing interface. You can put this view anywhere in your UI, and your user can draw in it. You can add UI controls to change drawing color, link width, and opacity. You can also get the current image from the scratch pad, clear the current image, or replace the current image.

An example xcode project is included that demonstrates simple usage.

DAScratchPad is compatible with iOS4.3+.


#### License

DAScratchPad is available under the MIT license. See the LICENSE file for more info.


#### How To Use

Copy the contents of the DAScratchPad directory to your xcode project.

Import DAScratchPad.h in appropriate places.

Add the QuartzCore frameworks to your project.

Add instance of DAScratchPad in interface builder, or add them programatically:

DAScratchPad* scratchpad = [[DAScratchPad alloc] initWithFrame:CGRectMake(30.0f, 30.0f, 150.0f, 150.0f)];
[self.view addSubview:scratchpad];

Change properties to control color, line width, and opacity:

scratchpad.drawColor = [UIColor greenColor];
scratchpad.drawWidth = 15.0f;
scratchpad.drawOpacity = 0.5f;

Use 'getSketch' to retrieve the current image:

UIImage* sketch = [scratchpad getSketch];

Use 'setSketch:' to replace the current image:

UIImage* image = [UIImage imageNamed:@"SavedImage.jpg"];
[scratchpad setSketch:image];

Use 'clearToColor:' to clear the current image:

[scratchpad clearToColor:[UIColor whiteColor]];

0 comments on commit 79f02fe

Please sign in to comment.